modern-evening-83482
07/07/2022, 6:57 AMpulumi:pulumi:Stack pulumi-infrastructure-network.dev running Calling __str__ on an Output[T] is not supported.
pulumi:pulumi:Stack pulumi-infrastructure-network.dev running To get the value of an Output[T] as an Output[str] consider:
pulumi:pulumi:Stack pulumi-infrastructure-network.dev running 1. o.apply(lambda v => f"prefix{v}suffix")
pulumi:pulumi:Stack pulumi-infrastructure-network.dev running See <https://pulumi.io/help/outputs> for more details.
pulumi:pulumi:Stack pulumi-infrastructure-network.dev running This function may throw in a future version of Pulumi.
pulumi:pulumi:Stack pulumi-infrastructure-network.dev 5 messages
Hello Guys, Any clue why pulumi is throwing the following warning. I am create a aws vpc and then using the vpc.id
fieldlittle-cartoon-10569
07/08/2022, 3:32 AMvpc.id
as a string, but it's not a string. It's a promise of a future string. You need to use an apply, which will be called in the future, when the value of the id will be available.modern-evening-83482
07/20/2022, 4:44 PMec2_public_rt = aws.ec2.RouteTable(
f"{env}-route-table-public-{suffix}",
vpc_id=vpc.id,
tags={
"Name": f"{env}-route-table-public-{suffix}",
},
routes=[
aws.ec2.RouteTableRouteArgs(
cidr_block="0.0.0.0/0",
gateway_id=ec2_internet_gateway.id,
),
],
opts=pulumi.ResourceOptions(provider=provider),
)
public_route_table = ec2_public_rt.id.apply(lambda _id: f"{_id}")
little-cartoon-10569
07/21/2022, 12:58 AMmodern-evening-83482
07/21/2022, 1:04 AMfor idx, subnet in enumerate(public_subnets):
ec2_subnet_route_table_association = aws.ec2.RouteTableAssociation(
f"{env}-public-subnet-route-table-association-{suffix}-{subnet}-{idx}",
route_table_id=ec2_public_rt.id,
subnet_id=subnet,
opts=pulumi.ResourceOptions(provider=provider),
)
dev-public-subnet-route-table-association-btrq-Calling __str__ on an Output[T] is not supported.
little-cartoon-10569
07/21/2022, 1:07 AMmodern-evening-83482
07/21/2022, 1:07 AMlittle-cartoon-10569
07/21/2022, 1:07 AMmodern-evening-83482
07/21/2022, 1:08 AMlittle-cartoon-10569
07/21/2022, 1:08 AMmodern-evening-83482
07/21/2022, 1:08 AMpublic_subnets = []
for subnet in range(subnet_counter, subnet_counter + number_of_azs):
ec2_subnet = aws.ec2.Subnet(
f"{env}-public-subnet-{subnet}-{suffix}",
availability_zone=available_azs.names[subnet - subnet_counter],
cidr_block=f"10.27.{subnet}.0/24",
vpc_id=vpc.id,
map_public_ip_on_launch=False,
tags={
"Type": "Public",
"Name": f"{env}-public-subnet-{subnet}-{suffix}",
},
opts=pulumi.ResourceOptions(provider=provider),
)
public_subnets.append(ec2_subnet.id.apply(lambda _id: f"{_id}"))
little-cartoon-10569
07/21/2022, 1:09 AMmodern-evening-83482
07/21/2022, 1:09 AMec2_subnet.id.apply(lambda _id: f"{_id}")
little-cartoon-10569
07/21/2022, 1:09 AMmodern-evening-83482
07/21/2022, 1:10 AMlittle-cartoon-10569
07/21/2022, 1:10 AMmodern-evening-83482
07/21/2022, 1:11 AMlittle-cartoon-10569
07/21/2022, 1:11 AMmodern-evening-83482
07/21/2022, 1:11 AMlittle-cartoon-10569
07/21/2022, 1:11 AMmodern-evening-83482
07/21/2022, 1:12 AM{subnet}
u meanlittle-cartoon-10569
07/21/2022, 1:12 AMmodern-evening-83482
07/21/2022, 1:12 AMlittle-cartoon-10569
07/21/2022, 1:13 AMmodern-evening-83482
07/21/2022, 1:13 AMf"10.27.{subnet}.0/24"
little-cartoon-10569
07/21/2022, 1:15 AMmodern-evening-83482
07/21/2022, 1:15 AMlittle-cartoon-10569
07/21/2022, 1:15 AMmodern-evening-83482
07/21/2022, 1:15 AMlittle-cartoon-10569
07/21/2022, 1:18 AMmodern-evening-83482
07/21/2022, 1:19 AMlittle-cartoon-10569
07/21/2022, 1:24 AMmodern-evening-83482
07/27/2022, 5:34 PMecs_cluster_name = infra_stack.get_output("ecs_cluster_name")
ecs_cluster_name
in my current stack in the ecs commands list(strings)little-cartoon-10569
07/27/2022, 7:58 PMmodern-evening-83482
09/16/2022, 12:43 AM