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

Add a description variable for google_compute_global_address resource #299

Merged
merged 3 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions modules/private_service_access/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ that are connected to the same VPC.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| address | First IP address of the IP range to allocate to CLoud SQL instances and other Private Service Access services. If not set, GCP will pick a valid one for you. | `string` | `""` | no |
| description | An optional description of the Global Address resource. | `string` | `""` | no |
| ip\_version | IP Version for the allocation. Can be IPV4 or IPV6. | `string` | `""` | no |
| labels | The key/value labels for the IP range allocated to the peered network. | `map(string)` | `{}` | no |
| prefix\_length | Prefix length of the IP range reserved for Cloud SQL instances and other Private Service Access services. Defaults to /16. | `number` | `16` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/private_service_access/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
data "google_compute_network" "main" {
name = var.vpc_network
project = var.project_id

}

// We define a VPC peering subnet that will be peered with the
Expand All @@ -28,6 +27,7 @@ resource "google_compute_global_address" "google-managed-services-range" {
provider = google-beta
project = var.project_id
name = "google-managed-services-${var.vpc_network}"
description = var.description
purpose = "VPC_PEERING"
address = var.address
prefix_length = var.prefix_length
Expand Down
6 changes: 6 additions & 0 deletions modules/private_service_access/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ variable "address" {
default = ""
}

variable "description" {
description = "An optional description of the Global Address resource."
type = string
default = ""
}

variable "prefix_length" {
description = "Prefix length of the IP range reserved for Cloud SQL instances and other Private Service Access services. Defaults to /16."
type = number
Expand Down