Skip to content

Commit

Permalink
Ensure use_legacy_workflow is available from 1.6
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanck authored and ansgarm committed Apr 9, 2024
1 parent 9334339 commit 3ad377b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions internal/schema/backends/s3.go
Expand Up @@ -445,6 +445,11 @@ func s3Backend(v *version.Version) *schema.BodySchema {
},
},
}
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."),
}
bodySchema.Attributes["custom_ca_bundle"] = &schema.AttributeSchema{
Constraint: schema.LiteralType{Type: cty.String},
IsOptional: true,
Expand Down Expand Up @@ -536,13 +541,7 @@ func s3Backend(v *version.Version) *schema.BodySchema {
}
}

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."),
}

if v.GreaterThanOrEqual(v1_7_0) && v.LessThan(v1_8_0) {
if v.GreaterThanOrEqual(v1_7_0) {
bodySchema.Attributes["use_legacy_workflow"] = &schema.AttributeSchema{
Constraint: schema.LiteralType{Type: cty.Bool},
IsOptional: true,
Expand Down

0 comments on commit 3ad377b

Please sign in to comment.