Skip to content

Commit

Permalink
Deprecate use_legacy_workflow s3 backend attr (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanck authored Jan 12, 2024
1 parent f5a142d commit 6171611
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/schema/backends/backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ var (
v1_6_1 = version.Must(version.NewVersion("1.6.1"))
v1_6_3 = version.Must(version.NewVersion("1.6.3"))
v1_6_4 = version.Must(version.NewVersion("1.6.4"))
v1_7_0 = version.Must(version.NewVersion("1.7.0"))
)

func BackendTypesAsOneOfConstraint(tfVersion *version.Version) schema.OneOf {
Expand Down
9 changes: 9 additions & 0 deletions internal/schema/backends/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,5 +541,14 @@ func s3Backend(v *version.Version) *schema.BodySchema {
}
}

if v.GreaterThanOrEqual(v1_7_0) {
bodySchema.Attributes["use_legacy_workflow"] = &schema.AttributeSchema{
Constraint: schema.LiteralType{Type: cty.Bool},
IsOptional: true,
Description: lang.Markdown("Use the legacy authentication workflow, preferring environment variables over backend configuration."),
IsDeprecated: true,
}
}

return bodySchema
}

0 comments on commit 6171611

Please sign in to comment.