@@ -57,8 +57,20 @@ type credentialResource struct {
5757}
5858
5959// ModifyPlan implements resource.ResourceWithModifyPlan.
60- // Use the modifier to set the effective region in the current plan.
6160func (r * credentialResource ) ModifyPlan (ctx context.Context , req resource.ModifyPlanRequest , resp * resource.ModifyPlanResponse ) { // nolint:gocritic // function signature required by Terraform
61+ r .modifyPlanRegion (ctx , & req , resp )
62+ if resp .Diagnostics .HasError () {
63+ return
64+ }
65+ r .modifyPlanExpiration (ctx , & req , resp )
66+ if resp .Diagnostics .HasError () {
67+ return
68+ }
69+ }
70+
71+ // ModifyPlan implements resource.ResourceWithModifyPlan.
72+ // Use the modifier to set the effective region in the current plan.
73+ func (r * credentialResource ) modifyPlanRegion (ctx context.Context , req * resource.ModifyPlanRequest , resp * resource.ModifyPlanResponse ) {
6274 var configModel Model
6375 // skip initial empty configuration to avoid follow-up errors
6476 if req .Config .Raw .IsNull () {
@@ -87,7 +99,7 @@ func (r *credentialResource) ModifyPlan(ctx context.Context, req resource.Modify
8799}
88100
89101// ModifyPlan implements resource.ResourceWithModifyPlan.
90- func (r * credentialResource ) ModifyPlan (ctx context.Context , req resource.ModifyPlanRequest , resp * resource.ModifyPlanResponse ) { // nolint:gocritic // function signature required by Terraform
102+ func (r * credentialResource ) modifyPlanExpiration (ctx context.Context , req * resource.ModifyPlanRequest , resp * resource.ModifyPlanResponse ) {
91103 p := path .Root ("expiration_timestamp" )
92104 var (
93105 stateDate time.Time
0 commit comments