aws-ia / terraform-aws-control_tower_account_factory

AWS Control Tower Account Factory
Apache License 2.0
604 stars 386 forks source link

Getting error (operation error S3: HeadBucket, https response error StatusCode: 301) while running terraform apply to configure aft management account #411

Closed siprap-ics closed 6 months ago

siprap-ics commented 6 months ago

Terraform Version & Prov:

AFT Version: 1.11.1

Bug Description I am trying to create new aft management account and added all details as explained in https://aws.amazon.com/blogs/aws/new-aws-control-tower-account-factory-for-terraform/ but when I am trying to run terraform apply I am getting the following error:

Error: reading Amazon S3 (Simple Storage) Bucket (aft-backend-675853664026-secondary-region): operation error S3: HeadBucket, https response error StatusCode: 301, RequestID: YTJ7M84V5DRBQX2K, HostID: 87oyYH8qviiKZFevchUr4xnGuEeylTe0QZ1lCRqw/4ha/PPtm7qHtH+r2Btp7fALy/y9EFud1kQsFmxwmXzqdA==, api error MovedPermanently: Moved Permanently │ │ with module.aft.module.aft_backend.aws_s3_bucket.secondary-backend-bucket[0], │ on .terraform\modules\aft\modules\aft-backend\main.tf line 21, in resource "aws_s3_bucket" "secondary-backend-bucket": │ 21: resource "aws_s3_bucket" "secondary-backend-bucket" {

The error is pointing to aws-repo

Please let me know if any other details you want.

Thanks in advance!!

hanafya commented 6 months ago

Hey @siprap-ics! Are you trying to create a second management account or is this for a completely new environment?

siprap-ics commented 6 months ago

Het @hanafya , Thanks for your reply...the issue got resolved. Hence, closing this issue.