Skip to content

Commit 37e2089

Browse files
committed
add region_instance_template
1 parent 4c14732 commit 37e2089

4 files changed

+18
-1
lines changed

mmv1/third_party/terraform/services/compute/resource_compute_region_instance_template.go.erb

+13
Original file line numberDiff line numberDiff line change
@@ -1048,6 +1048,15 @@ be from 0 to 999,999,999 inclusive.`,
10481048
},
10491049
},
10501050
},
1051+
1052+
"key_revocation_action_type": {
1053+
Type: schema.TypeString,
1054+
Optional: true,
1055+
ForceNew: true,
1056+
ValidateFunc: validation.StringInSlice([]string{"NONE", "STOP"}, false),
1057+
Default: "NONE",
1058+
Description: `Action to be taken when a customer's encryption key is revoked. Supports "STOP" and "NONE", with "NONE" being the default.`,
1059+
},
10511060
},
10521061
UseJSONNumber: true,
10531062
}
@@ -1130,6 +1139,7 @@ func resourceComputeRegionInstanceTemplateCreate(d *schema.ResourceData, meta in
11301139
<% end -%>
11311140
ResourcePolicies: resourcePolicies,
11321141
ReservationAffinity: reservationAffinity,
1142+
KeyRevocationActionType: d.Get("key_revocation_action_type").(string),
11331143
}
11341144

11351145
if _, ok := d.GetOk("effective_labels"); ok {
@@ -1334,6 +1344,9 @@ func resourceComputeRegionInstanceTemplateRead(d *schema.ResourceData, meta inte
13341344
if err = d.Set("instance_description", instanceProperties.Description); err != nil {
13351345
return fmt.Errorf("Error setting instance_description: %s", err)
13361346
}
1347+
if err = d.Set("key_revocation_action_type", instanceTemplate.Properties.KeyRevocationActionType); err != nil {
1348+
return fmt.Errorf("Error setting key_revocation_action_type: %s", err)
1349+
}
13371350
if err = d.Set("project", project); err != nil {
13381351
return fmt.Errorf("Error setting project: %s", err)
13391352
}

mmv1/third_party/terraform/website/docs/d/compute_instance_template.html.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ The following arguments are supported:
125125

126126
* `confidential_instance_config` - Enable [Confidential Mode](https://cloud.google.com/compute/confidential-vm/docs/about-cvm) on this VM. Structure is [documented below](#nested_confidential_instance_config)
127127

128-
* `key_revocation_action_type` - (optional) Action to be taken when a customer's encryption key is revoked. Supports `STOP` and `NONE`, with `NONE` being the default.
128+
* `key_revocation_action_type` - (optional) Action to be taken when a customer's encryption key is revoked.
129129

130130
<a name="nested_disk"></a>The `disk` block supports:
131131

mmv1/third_party/terraform/website/docs/d/compute_region_instance_template.html.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ The following arguments are supported:
111111

112112
* `confidential_instance_config` - Enable [Confidential Mode](https://cloud.google.com/compute/confidential-vm/docs/about-cvm) on this VM. Structure is [documented below](#nested_confidential_instance_config)
113113

114+
* `key_revocation_action_type` - (optional) Action to be taken when a customer's encryption key is revoked.
115+
114116
<a name="nested_disk"></a>The `disk` block supports:
115117

116118
* `auto_delete` - Whether or not the disk should be auto-deleted.

mmv1/third_party/terraform/website/docs/r/compute_region_instance_template.html.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,8 @@ The following arguments are supported:
393393

394394
* `partner_metadata` - (optional) [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) key/value pair represents partner metadata assigned to instance template where key represent a defined namespace and value is a json string represent the entries associted with the namespace.
395395

396+
* `key_revocation_action_type` - (optional) Action to be taken when a customer's encryption key is revoked. Supports `STOP` and `NONE`, with `NONE` being the default.
397+
396398
<a name="nested_disk"></a>The `disk` block supports:
397399

398400
* `auto_delete` - (Optional) Whether or not the disk should be auto-deleted.

0 commit comments

Comments
 (0)