From 6171611157701119f4e801f7b88f8455cfa822be Mon Sep 17 00:00:00 2001 From: Daniel Banck Date: Fri, 12 Jan 2024 13:18:28 +0100 Subject: [PATCH] Deprecate use_legacy_workflow s3 backend attr (#314) --- internal/schema/backends/backends.go | 1 + internal/schema/backends/s3.go | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/internal/schema/backends/backends.go b/internal/schema/backends/backends.go index 3d28aa11..081df0b6 100644 --- a/internal/schema/backends/backends.go +++ b/internal/schema/backends/backends.go @@ -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 { diff --git a/internal/schema/backends/s3.go b/internal/schema/backends/s3.go index aa35b142..cc67574f 100644 --- a/internal/schema/backends/s3.go +++ b/internal/schema/backends/s3.go @@ -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 }