Replies: 1 comment
-
are you using a remote state? are you sure that is being used? there only reason why it will not think it owns the bucket if they the apply is succeded but not on the remote state and maybe in a local state that got lost. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I can't find any documentation, issues, or discussions on this so I figured I'd ask here. Has anyone seen where atlantis requires an import of the terraform object before plan and apply can be done?
Without import it does this upon new terraform pr's:
│ Error: creating Amazon S3 (Simple Storage) Bucket (example-child-module): BucketAlreadyOwnedByYou: Your previous request to create the named bucket succeeded and you already own it.
I have root modules that have an AWS s3 backend which works fine.
The child module calls this root module with a general git source and adds its variable overrides like you normally would.
module "aws_s3_bucket" { source = "git::https://git.gh.st/scm/ter/aws_s3.git?ref=main" bucket_name="example-child-module" s3_lifecycle_days="11" }
If this is the first time this resource is created, then it plans and applies fine. But then if I create a new PR later it tries to create all the resources all over again and fails with the first message above since I already own this resource. I have to then run this import before planning and applying.
atlantis import module.aws_s3_bucket.aws_s3_bucket.bucket "example-bucket"
My question: Is this normal?? Am I doing something wrong?
Beta Was this translation helpful? Give feedback.
All reactions