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

Pass in the hashicorp/subnets/cidr name variable into the module and make that the name of the subnet #14

Closed
ghost opened this issue Jan 8, 2024 · 0 comments · Fixed by #15

Comments

@ghost
Copy link

ghost commented Jan 8, 2024

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I'd like to see the name from the hashicorp/subnets/cidr added to this module for processing.

module "app_subnet_addrs" {
  source  = "hashicorp/subnets/cidr"
  version = "v1.0.0"

  base_cidr_block = var.app_vpc_cidr
  networks = [
    {
      name     = "${var.resource_prefix}-firewall-1a"
      new_bits = 8
    },
    {
      name     = "${var.resource_prefix}-firewall-1b"
      new_bits = 8
    },
...

Describe the solution you'd like
A clear and concise description of what you want to happen.

The module would need updated to handle a map with a key/value pair to process.

The tagging would be easier, instead of

"Name" = format("%s-${lower(element(values(var.private_subnet_name_tag), count.index))}-%s", var.name, element(var.azs, count.index))

we can just do

"Name" = keys(var.private_subnets)[count.index]

@ghost ghost linked a pull request Jan 9, 2024 that will close this issue
@ghost ghost closed this as completed in #15 Jan 9, 2024
This issue was closed.
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 a pull request may close this issue.

0 participants