Skip to content

Commit 0bb2c27

Browse files
Add a new network_tier value FIXED_STANDARD to google_compute_instance_template & google_compute_instance resource (#5696) (#4233)
* update instance template validatefunc values Co-authored-by: upodroid <[email protected]> * add the change to instances as well * fix docs again * remove ValidateFunc Signed-off-by: Modular Magician <[email protected]>
1 parent b7d1595 commit 0bb2c27

File tree

5 files changed

+32
-24
lines changed

5 files changed

+32
-24
lines changed

.changelog/5696.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
```release-note:enhancement
2+
compute: added `FIXED_STANDARD` as a valid value to the field `network_interface.0.access_configs.0.network_tier` of `google_compute_instance_template` resource
3+
```
4+
```release-note:enhancement
5+
compute: added `STANDARD` as a valid value to the field `network_interface.0.ipv6_access_configs.0.network_tier` of `google_compute_instance_template` resource
6+
```
7+
```release-note:enhancement
8+
compute: added `FIXED_STANDARD` as a valid value to the field `network_interface.0.access_configs.0.network_tier` of `google_compute_instance` resource
9+
```
10+
```release-note:enhancement
11+
compute: added `STANDARD` as a valid value to the field `network_interface.0.ipv6_access_configs.0.network_tier` of `google_compute_instance` resource
12+
```

google-beta/resource_compute_instance.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -315,11 +315,10 @@ func resourceComputeInstance() *schema.Resource {
315315
},
316316

317317
"network_tier": {
318-
Type: schema.TypeString,
319-
Optional: true,
320-
Computed: true,
321-
ValidateFunc: validation.StringInSlice([]string{"PREMIUM", "STANDARD"}, false),
322-
Description: `The networking tier used for configuring this instance. One of PREMIUM or STANDARD.`,
318+
Type: schema.TypeString,
319+
Optional: true,
320+
Computed: true,
321+
Description: `The networking tier used for configuring this instance. One of PREMIUM or STANDARD.`,
323322
},
324323

325324
"public_ptr_domain_name": {
@@ -373,10 +372,9 @@ func resourceComputeInstance() *schema.Resource {
373372
Elem: &schema.Resource{
374373
Schema: map[string]*schema.Schema{
375374
"network_tier": {
376-
Type: schema.TypeString,
377-
Required: true,
378-
ValidateFunc: validation.StringInSlice([]string{"PREMIUM"}, false),
379-
Description: `The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM tier is valid for IPv6`,
375+
Type: schema.TypeString,
376+
Required: true,
377+
Description: `The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM tier is valid for IPv6`,
380378
},
381379
"public_ptr_domain_name": {
382380
Type: schema.TypeString,

google-beta/resource_compute_instance_template.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -365,12 +365,11 @@ func resourceComputeInstanceTemplate() *schema.Resource {
365365
Description: `The IP address that will be 1:1 mapped to the instance's network ip. If not given, one will be generated.`,
366366
},
367367
"network_tier": {
368-
Type: schema.TypeString,
369-
Optional: true,
370-
Computed: true,
371-
ForceNew: true,
372-
Description: `The networking tier used for configuring this instance template. This field can take the following values: PREMIUM or STANDARD. If this field is not specified, it is assumed to be PREMIUM.`,
373-
ValidateFunc: validation.StringInSlice([]string{"PREMIUM", "STANDARD"}, false),
368+
Type: schema.TypeString,
369+
Optional: true,
370+
Computed: true,
371+
ForceNew: true,
372+
Description: `The networking tier used for configuring this instance template. This field can take the following values: PREMIUM, STANDARD, FIXED_STANDARD. If this field is not specified, it is assumed to be PREMIUM.`,
374373
},
375374
// Possibly configurable- this was added so we don't break if it's inadvertently set
376375
"public_ptr_domain_name": {
@@ -427,10 +426,9 @@ func resourceComputeInstanceTemplate() *schema.Resource {
427426
Elem: &schema.Resource{
428427
Schema: map[string]*schema.Schema{
429428
"network_tier": {
430-
Type: schema.TypeString,
431-
Required: true,
432-
ValidateFunc: validation.StringInSlice([]string{"PREMIUM"}, false),
433-
Description: `The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM tier is valid for IPv6`,
429+
Type: schema.TypeString,
430+
Required: true,
431+
Description: `The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM tier is valid for IPv6`,
434432
},
435433
// Possibly configurable- this was added so we don't break if it's inadvertently set
436434
// (assuming the same ass access config)

website/docs/r/compute_instance.html.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ specified, then this instance will have no external IPv6 Internet access. Struct
318318
to become verified as a domain owner.
319319

320320
* `network_tier` - (Optional) The [networking tier][network-tier] used for configuring this instance.
321-
This field can take the following values: PREMIUM or STANDARD. If this field is
321+
This field can take the following values: PREMIUM, FIXED_STANDARD or STANDARD. If this field is
322322
not specified, it is assumed to be PREMIUM.
323323

324324
<a name="nested_ipv6_access_config"></a>The `ipv6_access_config` block supports:
@@ -327,7 +327,7 @@ specified, then this instance will have no external IPv6 Internet access. Struct
327327
records for the external IPv6 ranges..
328328

329329
* `network_tier` - (Optional) The service-level to be provided for IPv6 traffic when the
330-
subnet has an external subnet. Only PREMIUM tier is valid for IPv6.
330+
subnet has an external subnet. Only PREMIUM or STANDARD tier is valid for IPv6.
331331

332332
<a name="nested_alias_ip_range"></a>The `alias_ip_range` block supports:
333333

website/docs/r/compute_instance_template.html.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,13 +391,13 @@ specified, then this instance will have no external IPv6 Internet access. Struct
391391
network ip. If not given, one will be generated.
392392

393393
* `network_tier` - (Optional) The [networking tier][network-tier] used for configuring
394-
this instance template. This field can take the following values: PREMIUM or
395-
STANDARD. If this field is not specified, it is assumed to be PREMIUM.
394+
this instance template. This field can take the following values: PREMIUM,
395+
STANDARD or FIXED_STANDARD. If this field is not specified, it is assumed to be PREMIUM.
396396

397397
<a name="nested_ipv6_access_config"></a>The `ipv6_access_config` block supports:
398398

399399
* `network_tier` - (Optional) The service-level to be provided for IPv6 traffic when the
400-
subnet has an external subnet. Only PREMIUM tier is valid for IPv6.
400+
subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.
401401

402402
<a name="nested_alias_ip_range"></a>The `alias_ip_range` block supports:
403403

0 commit comments

Comments
 (0)