Skip to content

Commit

Permalink
Change google_compute_subnetwork.purpose to a String (hashicorp#4581) (
Browse files Browse the repository at this point in the history
…hashicorp#3043)

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Mar 10, 2021
1 parent a376341 commit 04a75c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .changelog/4581.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
compute: `google_compute_subnetwork` will accept more values in the `purpose` field
```
11 changes: 5 additions & 6 deletions google-beta/resource_compute_subnetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,18 +185,17 @@ access Google APIs and services by using Private Google Access.`,
Description: `The private IPv6 google access type for the VMs in this subnet.`,
},
"purpose": {
Type: schema.TypeString,
Computed: true,
Optional: true,
ForceNew: true,
ValidateFunc: validation.StringInSlice([]string{"INTERNAL_HTTPS_LOAD_BALANCER", "PRIVATE", ""}, false),
Type: schema.TypeString,
Computed: true,
Optional: true,
ForceNew: true,
Description: `The purpose of the resource. This field can be either PRIVATE
or INTERNAL_HTTPS_LOAD_BALANCER. A subnetwork with purpose set to
INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is
reserved for Internal HTTP(S) Load Balancing. If unspecified, the
purpose defaults to PRIVATE.
If set to INTERNAL_HTTPS_LOAD_BALANCER you must also set the role. Possible values: ["INTERNAL_HTTPS_LOAD_BALANCER", "PRIVATE"]`,
If set to INTERNAL_HTTPS_LOAD_BALANCER you must also set 'role'.`,
},
"region": {
Type: schema.TypeString,
Expand Down
3 changes: 1 addition & 2 deletions website/docs/r/compute_subnetwork.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ The following arguments are supported:
INTERNAL_HTTPS_LOAD_BALANCER is a user-created subnetwork that is
reserved for Internal HTTP(S) Load Balancing. If unspecified, the
purpose defaults to PRIVATE.
If set to INTERNAL_HTTPS_LOAD_BALANCER you must also set the role.
Possible values are `INTERNAL_HTTPS_LOAD_BALANCER` and `PRIVATE`.
If set to INTERNAL_HTTPS_LOAD_BALANCER you must also set `role`.

* `role` -
(Optional, [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html))
Expand Down

0 comments on commit 04a75c8

Please sign in to comment.