Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use vpc tags to get vpc id #219

Closed
wants to merge 6 commits into from
Closed

feat: use vpc tags to get vpc id #219

wants to merge 6 commits into from

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