@@ -265,6 +265,16 @@ backupPlans.delete to ensure that their change will be applied to the same versi
265
265
Computed : true ,
266
266
Description : `The number of Kubernetes Pods backed up in the last successful Backup created via this BackupPlan.` ,
267
267
},
268
+ "state" : {
269
+ Type : schema .TypeString ,
270
+ Computed : true ,
271
+ Description : `The State of the BackupPlan.` ,
272
+ },
273
+ "state_reason" : {
274
+ Type : schema .TypeString ,
275
+ Computed : true ,
276
+ Description : `Detailed description of why BackupPlan is in its current state.` ,
277
+ },
268
278
"uid" : {
269
279
Type : schema .TypeString ,
270
280
Computed : true ,
@@ -479,6 +489,12 @@ func resourceGKEBackupBackupPlanRead(d *schema.ResourceData, meta interface{}) e
479
489
if err := d .Set ("protected_pod_count" , flattenGKEBackupBackupPlanProtectedPodCount (res ["protectedPodCount" ], d , config )); err != nil {
480
490
return fmt .Errorf ("Error reading BackupPlan: %s" , err )
481
491
}
492
+ if err := d .Set ("state" , flattenGKEBackupBackupPlanState (res ["state" ], d , config )); err != nil {
493
+ return fmt .Errorf ("Error reading BackupPlan: %s" , err )
494
+ }
495
+ if err := d .Set ("state_reason" , flattenGKEBackupBackupPlanStateReason (res ["stateReason" ], d , config )); err != nil {
496
+ return fmt .Errorf ("Error reading BackupPlan: %s" , err )
497
+ }
482
498
483
499
return nil
484
500
}
@@ -914,6 +930,14 @@ func flattenGKEBackupBackupPlanProtectedPodCount(v interface{}, d *schema.Resour
914
930
return v // let terraform core handle it otherwise
915
931
}
916
932
933
+ func flattenGKEBackupBackupPlanState (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
934
+ return v
935
+ }
936
+
937
+ func flattenGKEBackupBackupPlanStateReason (v interface {}, d * schema.ResourceData , config * transport_tpg.Config ) interface {} {
938
+ return v
939
+ }
940
+
917
941
func expandGKEBackupBackupPlanName (v interface {}, d tpgresource.TerraformResourceData , config * transport_tpg.Config ) (interface {}, error ) {
918
942
return tpgresource .ReplaceVars (d , config , "projects/{{project}}/locations/{{location}}/backupPlans/{{name}}" )
919
943
}
0 commit comments