Skip to content

Commit 28b3006

Browse files
authored
feat: add Description field to cloud router (#32)
1 parent 0e9a238 commit 28b3006

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Functional examples are included in the
2727
| Name | Description | Type | Default | Required |
2828
|------|-------------|------|---------|:--------:|
2929
| bgp | BGP information specific to this router. | `any` | `null` | no |
30+
| description | An optional description of this resource | `string` | `null` | no |
3031
| name | Name of the router | `string` | n/a | yes |
3132
| nats | NATs to deploy on this router. | `any` | `[]` | no |
3233
| network | A reference to the network to which this router belongs | `string` | n/a | yes |

main.tf

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@
1515
*/
1616

1717
resource "google_compute_router" "router" {
18-
name = var.name
19-
network = var.network
20-
region = var.region
21-
project = var.project
18+
name = var.name
19+
network = var.network
20+
region = var.region
21+
project = var.project
22+
description = var.description
2223
dynamic "bgp" {
2324
for_each = var.bgp != null ? [var.bgp] : []
2425
content {

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ variable "region" {
3434
description = "Region where the router resides"
3535
}
3636

37+
variable "description" {
38+
type = string
39+
description = "An optional description of this resource"
40+
default = null
41+
}
42+
3743
# TODO(https://github.com/hashicorp/terraform/issues/19898): Convert these
3844
# to objects once optional variables are supported.
3945

0 commit comments

Comments
 (0)