https://pulumi.com logo
Title
d

damp-toddler-4614

03/03/2022, 3:47 AM
Hi - I am creating aws subnet as follows:
var subnet = new Ec2.Subnet(subnetName, new Ec2.SubnetArgs
            {
                CidrBlock = config.CidrBlock,
                AvailabilityZone=config.AvailabilityZone,
                VpcId = config.VpcId
            });
but when the subnet is created in aws, it doesnt have the name defined. The
SubnetArgs
also doesnt have a
Name
property unlike most other resources. Is there a way I can specify the name?
b

billowy-army-68599

03/03/2022, 4:02 AM
you need to set it as a tag:
Tag = {
 Name: my-name
}
d

damp-toddler-4614

03/03/2022, 4:05 AM
aah.. will give it a try - thank you