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 ip aliases configuration #229

Closed
thiagonache opened this issue Jan 31, 2022 · 3 comments · Fixed by #233
Closed

Allow ip aliases configuration #229

thiagonache opened this issue Jan 31, 2022 · 3 comments · Fixed by #233
Labels
enhancement New feature or request

Comments

@thiagonache
Copy link
Contributor

TL;DR

I want to be able to set ip aliases while create compute instances. Would you accept a PR for it?

Terraform Resources

compute instances

Detailed design

The idea is to have a new variable

variable "alias_ip_range" {
  description = "(Optional) An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks."
  type = list(object({
    ip_cidr_range         = string
    subnetwork_range_name = string
  }))
  default = []
}

And add a dynamic block inside of network interface

    dynamic "alias_ip_range" {
      for_each = var.alias_ip_range
      content {
        ip_cidr_range         = alias_ip_range.value.ip_cidr_range
        subnetwork_range_name = alias_ip_range.value.subnetwork_range_name
      }
    }


### Additional information

_No response_
@thiagonache thiagonache added the enhancement New feature or request label Jan 31, 2022
@morgante
Copy link
Contributor

morgante commented Feb 1, 2022

Which module would you put this on?

@thiagonache
Copy link
Contributor Author

thiagonache commented Feb 1, 2022 via email

@morgante
Copy link
Contributor

morgante commented Feb 1, 2022

Got it. yes this could be included within the network_interfaces config on the module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants