- Newest
- Most votes
- Most comments
While the Landing Zone Accelerator (LZA) configuration you've provided doesn't directly show a method for adding tags to subnets, you can typically add tags to AWS resources, including subnets, by including a 'tags' section in the resource definition. For subnets in LZA, you should be able to add tags by including a 'tags' key-value pair within each subnet definition.
Try modifying your subnet configurations like this:
subnets: - name: accelerator-subnet-a availabilityZone: a routeTable: accelerator-default ipv4CidrBlock: 10.0.0.0/26 tags: - key: YourTagKey1 value: YourTagValue1 - key: YourTagKey2 value: YourTagValue2 - name: accelerator-subnet-b availabilityZone: b routeTable: accelerator-default ipv4CidrBlock: 10.0.0.64/26 tags: - key: YourTagKey1 value: YourTagValue1 - key: YourTagKey2 value: YourTagValue2
This approach should allow you to add custom tags to your subnets when they are created through LZA. Remember to replace 'YourTagKey1', 'YourTagValue1', etc., with the actual tag keys and values you want to use.
If this method doesn't work within the LZA framework, you might need to consider alternative approaches, such as using AWS Lambda functions or AWS Systems Manager Automation documents as part of your LZA workflow to add tags to subnets after they are created.
Sources
Transit gateway attachments to a VPC - Network Orchestration for AWS Transit Gateway
Tag subnets for EKS Auto Mode - Amazon EKS
Relevant content
- asked a month ago
- asked 2 months ago
- asked 3 months ago
- asked 6 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 8 months ago