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

Allow adding subnet tags per subnet name #900

Closed
rcarpenter79 opened this issue Feb 28, 2023 · 5 comments
Closed

Allow adding subnet tags per subnet name #900

rcarpenter79 opened this issue Feb 28, 2023 · 5 comments
Labels

Comments

@rcarpenter79
Copy link

I would like to add subnet tags that are specific to the name of the subnet.
We have processes that look up what subnet to use based on the configured tags.
I couldn't see an existing way of achieving this.

This functionality would work the same as private_subnet_tags_per_az and public_subnet_tags_per_az but use a map containing the subnet names instead.

I have added the functionality locally to test it worked as expected.

  tags = merge(
    {
      Name = try(
        var.private_subnet_names[count.index],
        format("${var.name}-${var.private_subnet_suffix}-%s", element(var.azs, count.index))
      )
    },
    var.tags,
    var.private_subnet_tags,
    lookup(var.private_subnet_tags_per_az, element(var.azs, count.index), {}),
    try(
      lookup(var.private_subnet_tags_per_subnet, element(var.private_subnet_names, count.index), {}),
      {}
    )
  )
@github-actions
Copy link

github-actions bot commented Apr 3, 2023

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label Apr 3, 2023
@rcarpenter79
Copy link
Author

Not stale

@github-actions github-actions bot removed the stale label Apr 6, 2023
@github-actions
Copy link

github-actions bot commented May 7, 2023

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale label May 7, 2023
@rcarpenter79
Copy link
Author

It looks like PR #901 will resolve this issue

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant