Is there a way to tags resources more aptly when u...
# golang
Is there a way to tags resources more aptly when using awsx? I have the below starter code, but I only see a way to set tags at the VPC level and not for the other components that the vpcx module creates.
Copy code
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cidr := ""
		vpcName := "dna"
		_, err := ec2x.NewVpc(ctx, vpcName, &ec2x.VpcArgs{
			CidrBlock: &cidr,
			Tags:      pulumi.ToStringMap(namedTags(ctx, vpcName)),
		if err != nil {
		return nil
This code does what is needed but the names are like
for a subnet for example.
what would you like to happen?
@billowy-army-68599 I would like to name the subnets, NATs, EIPs in a way that includes the AZ in the name.
you would need to retrieve them using a getter function in that case
Ohh you mean retrieve and tag? I did not know that could be done. @billowy-army-68599
@billowy-army-68599 I tried using a getter, but I was not able to find a way to modify the said resource after fetching the state. I don't see a way to set/modify the already provisioned resource. Please correct me if I am missing something.
If you want to modify and existing resource you haven't provisioned with Pulumi, you'll need to import it first
You can't just patch a resource that exists
It needs to be fully managed by Pulumi
Got it. Thanks!