ambitious-king-70853
02/21/2024, 7:33 PMred-match-15116
02/21/2024, 8:40 PMambitious-king-70853
02/22/2024, 3:50 PMambitious-king-70853
02/25/2024, 10:31 PMTypeError: 'Output' object is not iterable, consider iterating the underlying value inside an 'apply'
Relevant Code:
...
with open('manifest_yamls/cloudflared-deployment.yaml', 'r') as file:
templated_yaml_content = file.read()
deploy_yaml = Output.all(namespace_ckc, tunnel.tunnel_token).apply(
lambda outputs: replace_placeholders(
templated_yaml_content,
{
"namespace": outputs[0],
"tunnel_token": outputs[1],
}
)
)
deployment = ConfigGroup(
"cloudflared-deployment",
resource_prefix="cloudflared",
yaml=deploy_yaml,
opts=pulumi.ResourceOptions(
provider=k8s_provider,
depends_on=[namespace_obj_ckc]
)
)
I've output "deploy_yaml" as a string into the console and I know that my values are being replaced, but I can't run pulumi up due to the type error.ambitious-king-70853
02/25/2024, 10:32 PMambitious-king-70853
02/25/2024, 10:53 PMAwaitable[str]
type and not worry about conversions / async. Thanks for the tip on Output.all(...)
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.
Powered by