Skip to content

Commit d968334

Browse files
Add numeric_id to compute_instance_region_template (#14108) (#23065)
[upstream:d1f449233e3b8b2d13a1625e59c0bd9ff49958d6] Signed-off-by: Modular Magician <[email protected]>
1 parent 092c36f commit d968334

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.changelog/14108.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
compute: added `numeric_id` to `google_compute_region_instance_template` resource
3+
```

google/services/compute/resource_compute_region_instance_template.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,13 @@ Google Cloud KMS. Only one of kms_key_self_link, rsa_encrypted_key and raw_key m
641641
},
642642
},
643643

644+
"numeric_id": {
645+
Type: schema.TypeString,
646+
ForceNew: true,
647+
Computed: true,
648+
Description: `The ID of the template in numeric format.`,
649+
},
650+
644651
"project": {
645652
Type: schema.TypeString,
646653
Optional: true,
@@ -1330,6 +1337,10 @@ func resourceComputeRegionInstanceTemplateRead(d *schema.ResourceData, meta inte
13301337
}
13311338
}
13321339

1340+
if err = d.Set("numeric_id", instanceTemplate["id"]); err != nil {
1341+
return fmt.Errorf("Error setting numeric_id: %s", err)
1342+
}
1343+
13331344
// Set the tags fingerprint if there is one.
13341345
if instanceProperties.Tags != nil {
13351346
if err = d.Set("tags_fingerprint", instanceProperties.Tags.Fingerprint); err != nil {

website/docs/r/compute_region_instance_template.html.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,8 @@ exported:
771771

772772
* `metadata_fingerprint` - The unique fingerprint of the metadata.
773773

774+
* `numeric_id` - numeric identifier of the resource.
775+
774776
* `self_link` - The URI of the created resource.
775777

776778
* `tags_fingerprint` - The unique fingerprint of the tags.

0 commit comments

Comments
 (0)