mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
backend/s3: skip account verification when no constraints given (#772)
Signed-off-by: Marcin Białoń <mbialon@spacelift.io>
This commit is contained in:
@@ -621,6 +621,10 @@ func (b *Backend) Configure(obj cty.Value) tfdiags.Diagnostics {
|
||||
}
|
||||
|
||||
func verifyAllowedAccountID(ctx context.Context, awsConfig aws.Config, cfg *awsbase.Config) tfdiags.Diagnostics {
|
||||
if len(cfg.ForbiddenAccountIds) == 0 && len(cfg.AllowedAccountIds) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
var diags tfdiags.Diagnostics
|
||||
accountID, _, awsDiags := awsbase.GetAwsAccountIDAndPartition(ctx, awsConfig, cfg)
|
||||
for _, d := range awsDiags {
|
||||
|
||||
Reference in New Issue
Block a user