Skip to content

Commit

Permalink
Add creation_timestamp to google_compute_(region_)instance_group_mana…
Browse files Browse the repository at this point in the history
…ger (GoogleCloudPlatform#9874)

* Add creation_timestamp to google_compute_(region_)instance_group_manager

* Update mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb

Co-authored-by: Shuya Ma <[email protected]>

* Update mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb

Co-authored-by: Shuya Ma <[email protected]>

* Update mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb

Co-authored-by: Shuya Ma <[email protected]>

* Update mmv1/third_party/terraform/services/compute/resource_compute_region_instance_group_manager.go.erb

Co-authored-by: Shuya Ma <[email protected]>

* Update mmv1/third_party/terraform/services/compute/resource_compute_instance_group_manager.go.erb

Co-authored-by: Shuya Ma <[email protected]>

---------

Co-authored-by: Shuya Ma <[email protected]>
  • Loading branch information
2 people authored and balanaguharsha committed May 2, 2024
1 parent 958f584 commit 58db9c9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ func ResourceComputeInstanceGroupManager() *schema.Resource {
Description: `The zone that instances in this group should be created in.`,
},

"creation_timestamp": {
Type: schema.TypeString,
Computed: true,
Description: `Creation timestamp in RFC3339 text format.`,
},

"description": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -757,6 +763,9 @@ func resourceComputeInstanceGroupManagerRead(d *schema.ResourceData, meta interf
if err := d.Set("zone", tpgresource.GetResourceNameFromSelfLink(manager.Zone)); err != nil {
return fmt.Errorf("Error setting zone: %s", err)
}
if err := d.Set("creation_timestamp", manager.CreationTimestamp); err != nil {
return fmt.Errorf("Error reading creation_timestamp: %s", err)
}
if err := d.Set("description", manager.Description); err != nil {
return fmt.Errorf("Error setting description: %s", err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ func ResourceComputeRegionInstanceGroupManager() *schema.Resource {
Description: `The region where the managed instance group resides.`,
},

"creation_timestamp": {
Type: schema.TypeString,
Computed: true,
Description: `Creation timestamp in RFC3339 text format.`,
},

"description": {
Type: schema.TypeString,
Optional: true,
Expand Down Expand Up @@ -708,6 +714,9 @@ func resourceComputeRegionInstanceGroupManagerRead(d *schema.ResourceData, meta
if err := d.Set("region", tpgresource.GetResourceNameFromSelfLink(manager.Region)); err != nil {
return fmt.Errorf("Error setting region: %s", err)
}
if err := d.Set("creation_timestamp", manager.CreationTimestamp); err != nil {
return fmt.Errorf("Error reading creation_timestamp: %s", err)
}
if err := d.Set("description", manager.Description); err != nil {
return fmt.Errorf("Error setting description: %s", err)
}
Expand Down

0 comments on commit 58db9c9

Please sign in to comment.