Skip to content

Conversation

@nitrocode
Copy link
Member

@nitrocode nitrocode commented Jan 10, 2025

what

  • feat: use vpc tags to get vpc id

why

  • Id like to create subnets off of an existing vpc using a component based off of this module without hard coding the vpc id
  • By allowing us to use tags, we can use tags such as the following to get the vpc id
components: 
  terraform:
    vpc/example:
      vars:
        # ...

    vpc/example/dynamic-subnets/db:
      metadata:
        component: dynamic-subnets
      vars:
        vpc_tags:
          Name: org-ue1-prod-vpc
          Environment: ue1
          Stage: prod
        # ...

Edit: Without the pr, we can read remote state using this without supplying tags

    vpc/example/dynamic-subnets/db:
      metadata:
        component: dynamic-subnets
      vars:
        vpc_id: !terraform.output vpc/example vpc_id

references

@nitrocode nitrocode requested review from a team as code owners January 10, 2025 04:26
@mergify mergify bot added the triage Needs triage label Jan 10, 2025
@nitrocode nitrocode closed this Jan 10, 2025
@mergify mergify bot removed the triage Needs triage label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant