Skip to content

Commit

Permalink
'AttributePath.WithElementKeyInt' now requires int: hashicorp/terrafo…
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Sep 29, 2021
1 parent dbb9b38 commit 5f4a411
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/generic/translate.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (t toTerraform) valueFromRaw(ctx context.Context, schema *tfsdk.Schema, pat
// No need to worry about a specific value here.
path = path.WithElementKeyValue(tftypes.NewValue(typ.(tftypes.Set).ElementType, nil))
} else {
path = path.WithElementKeyInt(int64(idx))
path = path.WithElementKeyInt(idx)
}
val, err := t.valueFromRaw(ctx, schema, path, v)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/generic/unknown.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ func unknownValuePaths(ctx context.Context, inTerraformState, inCloudControlReso
inTerraformState = inTerraformState.WithElementKeyValue(val)
inCloudControlResourceModel = inCloudControlResourceModel.WithElementKeyValue(val)
} else {
inTerraformState = inTerraformState.WithElementKeyInt(int64(idx))
inCloudControlResourceModel = inCloudControlResourceModel.WithElementKeyInt(int64(idx))
inTerraformState = inTerraformState.WithElementKeyInt(idx)
inCloudControlResourceModel = inCloudControlResourceModel.WithElementKeyInt(idx)
}
paths, err := unknownValuePaths(ctx, inTerraformState, inCloudControlResourceModel, val, tfToCfNameMap)
if err != nil {
Expand Down

0 comments on commit 5f4a411

Please sign in to comment.