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

failed to lock s3 state: 2 errors occurred: #108

Open
Mazuco opened this issue Oct 16, 2023 · 2 comments
Open

failed to lock s3 state: 2 errors occurred: #108

Mazuco opened this issue Oct 16, 2023 · 2 comments
Labels

Comments

@Mazuco
Copy link

Mazuco commented Oct 16, 2023

Hello, in the "State File Isolation" section, when following the commands and codes, when it comes time to create a new workspace:

terraform workspace new example1

It issues this error:

terraform workspace new test1

failed to lock s3 state: 2 errors occurred:

  • ResourceNotFoundException: Requested resource not found
  • ResourceNotFoundException: Requested resource not found

I've tried different ways to fix this, I've used your main.tf code, but it doesn't work. How can we resolve this?

@thanhtrungit25
Copy link

I know this issue, because the name resource you typed in code, and when you copy in book. They not matched

@brikis98
Copy link
Owner

It sounds like you have a backend configuration in your code pointing to an S3 bucket and/or DynamoDB table that does not yet exist. Did you create the bucket and table before running init / terraform workspace new?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants