Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add skip_requesting_account_id to s3 backend #279

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions internal/schema/backends/backends.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var (
v1_3_0 = version.Must(version.NewVersion("1.3.0"))
v1_4_0 = version.Must(version.NewVersion("1.4.0"))
v1_6_0 = version.Must(version.NewVersion("1.6.0"))
v1_6_1 = version.Must(version.NewVersion("1.6.1"))
)

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

if v.GreaterThanOrEqual(v1_6_1) {
bodySchema.Attributes["skip_requesting_account_id"] = &schema.AttributeSchema{
Constraint: schema.LiteralType{Type: cty.Bool},
IsOptional: true,
Description: lang.Markdown("Skip the requesting account ID. Useful for AWS API implementations that do not have the IAM, STS API, or metadata API."),
}
}

return bodySchema
}
3 changes: 2 additions & 1 deletion schema/versions_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.