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

S3 bucket creation | Existing Buckets #26006

Closed
rishabhjain1510 opened this issue Jul 27, 2022 · 2 comments
Closed

S3 bucket creation | Existing Buckets #26006

rishabhjain1510 opened this issue Jul 27, 2022 · 2 comments
Labels
bug Addresses a defect in current functionality. service/s3 Issues and PRs that pertain to the s3 service.

Comments

@rishabhjain1510
Copy link

while creating a S3 bucket using terraform, if that bucket already exists we are facing an weird issue

Current Scenario:
S3 bucket :- "test-rishabh-111"
This bucket was created via terraform different product about 1 year ago
image

When created the same bucket via Terraform using below code

resource "aws_s3_bucket" "test_bucket" {
bucket = "test-rishabh-111"
}
-----Terraform Apply-------------
$ terraform13 apply --auto-approve
aws_s3_bucket.test_bucket: Creating...
aws_s3_bucket.test_bucket: Still creating... [10s elapsed]
aws_s3_bucket.test_bucket: Still creating... [20s elapsed]
aws_s3_bucket.test_bucket: Creation complete after 22s [id=test-rishabh-111]

Terraform says it has been successfully created . and adds this resources in the state also.

Expected Behavior

This should have given the error that bucket already exist , at least should not have include the resource under the state.

Now the same resource is managed by the two different states.

If i delete any tf resource it will delete the s3 bucket also.

Terraform Version Details:
AWS Provider :- 3.75.1
Terraform Version : 0.13.6

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/s3 Issues and PRs that pertain to the s3 service. labels Jul 27, 2022
@gdavison gdavison added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 27, 2022
@gdavison
Copy link
Contributor

gdavison commented Jul 27, 2022

This is a duplicate of #13587

@gdavison gdavison closed this as not planned Won't fix, can't repro, duplicate, stale Jul 27, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/s3 Issues and PRs that pertain to the s3 service.
Projects
None yet
Development

No branches or pull requests

2 participants