Skip to content

Add support for reserved internal ranges to google_compute_subnetwork #18465

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

Closed
caveman8fb opened this issue Jun 17, 2024 · 2 comments
Closed
Labels

Comments

@caveman8fb
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Description

Add the reserved-internal-range option to google_compute_subnetwork to support using an ip_cidr from google_network_connectivity_internal_range.

This would allow a subnet to be created with a automatically assigned subnet from the target_cidr_range by prefix_length

New or Affected Resource(s)

google_compute_subnetwork

Potential Terraform Configuration

resource "google_compute_subnetwork" "subnet" {
  name                    = "test-subnetwork"
  reserved-internal-range = google_network_connectivity_internal_range.default.id
  region                  = "us-central1"
  network                 = google_compute_network.vpc.id
}

resource "google_compute_network" "vpc" {
  name                    = "internal-ranges-vpc"
  auto_create_subnetworks = false
}

resource "google_network_connectivity_internal_range" "default" {
  name          = "automatic-reservation"
  network       = google_compute_network.vpc.id
  usage         = "FOR_VPC"
  peering       = "FOR_SELF"
  prefix_length = 24
  target_cidr_range = [
    "192.168.128.0/18"
  ]
}

References

https://cloud.google.com/vpc/docs/create-use-internal-ranges#create-subnet-partial-range

@caveman8fb caveman8fb changed the title Add support for internal ranges to VCP Subnets Add support for reserved internal ranges to VCP Subnets Jun 17, 2024
@github-actions github-actions bot added forward/review In review; remove label to forward service/compute-vpc labels Jun 17, 2024
@caveman8fb caveman8fb changed the title Add support for reserved internal ranges to VCP Subnets Add support for reserved internal ranges to google_compute_subnetwork Jun 20, 2024
@caveman8fb
Copy link
Author

Duplicate of #17881

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 Jul 26, 2024
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