Skip to content

Commit fe91aa5

Browse files
authored
feat: Add a description variable for google_compute_global_address resource (#299)
* Add an ability to set description * Remove empty line * Document description input
1 parent 2734f71 commit fe91aa5

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

modules/private_service_access/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ that are connected to the same VPC.
1616
| Name | Description | Type | Default | Required |
1717
|------|-------------|------|---------|:--------:|
1818
| 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 |
19+
| description | An optional description of the Global Address resource. | `string` | `""` | no |
1920
| ip\_version | IP Version for the allocation. Can be IPV4 or IPV6. | `string` | `""` | no |
2021
| labels | The key/value labels for the IP range allocated to the peered network. | `map(string)` | `{}` | no |
2122
| 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 |

modules/private_service_access/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
data "google_compute_network" "main" {
1818
name = var.vpc_network
1919
project = var.project_id
20-
2120
}
2221

2322
// We define a VPC peering subnet that will be peered with the
@@ -28,6 +27,7 @@ resource "google_compute_global_address" "google-managed-services-range" {
2827
provider = google-beta
2928
project = var.project_id
3029
name = "google-managed-services-${var.vpc_network}"
30+
description = var.description
3131
purpose = "VPC_PEERING"
3232
address = var.address
3333
prefix_length = var.prefix_length

modules/private_service_access/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ variable "address" {
3030
default = ""
3131
}
3232

33+
variable "description" {
34+
description = "An optional description of the Global Address resource."
35+
type = string
36+
default = ""
37+
}
38+
3339
variable "prefix_length" {
3440
description = "Prefix length of the IP range reserved for Cloud SQL instances and other Private Service Access services. Defaults to /16."
3541
type = number

0 commit comments

Comments
 (0)