Skip to content

Commit f549476

Browse files
Add timeouts to upgradestate
1 parent be3be20 commit f549476

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

helm/resource_helm_release_stateupgrader.go

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,21 @@ func (r *HelmRelease) buildUpgradeStateMap(_ context.Context) map[int64]resource
250250
"set_wo_revision": tftypes.Number,
251251
"status": tftypes.String,
252252
"timeout": tftypes.Number,
253-
"upgrade_install": tftypes.Bool,
254-
"take_ownership": tftypes.Bool,
255-
"values": tftypes.List{ElementType: tftypes.String},
256-
"verify": tftypes.Bool,
257-
"version": tftypes.String,
258-
"wait": tftypes.Bool,
259-
"wait_for_jobs": tftypes.Bool,
253+
"timeouts": tftypes.Object{
254+
AttributeTypes: map[string]tftypes.Type{
255+
"create": tftypes.String,
256+
"read": tftypes.String,
257+
"update": tftypes.String,
258+
"delete": tftypes.String,
259+
},
260+
},
261+
"upgrade_install": tftypes.Bool,
262+
"take_ownership": tftypes.Bool,
263+
"values": tftypes.List{ElementType: tftypes.String},
264+
"verify": tftypes.Bool,
265+
"version": tftypes.String,
266+
"wait": tftypes.Bool,
267+
"wait_for_jobs": tftypes.Bool,
260268
},
261269
}
262270
newValue := tftypes.NewValue(newType, map[string]tftypes.Value{
@@ -272,6 +280,7 @@ func (r *HelmRelease) buildUpgradeStateMap(_ context.Context) map[int64]resource
272280
"take_ownership": tftypes.NewValue(tftypes.Bool, false),
273281
"set_wo_revision": tftypes.NewValue(tftypes.Number, float64(1)),
274282
"resources": tftypes.NewValue(tftypes.Map{ElementType: tftypes.String}, map[string]tftypes.Value{}),
283+
"timeouts": tftypes.NewValue(newType.AttributeTypes["timeouts"], nil),
275284
"atomic": oldState["atomic"],
276285
"chart": oldState["chart"],
277286
"cleanup_on_fail": oldState["cleanup_on_fail"],

0 commit comments

Comments
 (0)