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

[Bug]: Terraform pipeline unable to upload the tf statefile #745

Open
1 of 2 tasks
stemons opened this issue Jul 9, 2024 · 0 comments
Open
1 of 2 tasks

[Bug]: Terraform pipeline unable to upload the tf statefile #745

stemons opened this issue Jul 9, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@stemons
Copy link
Contributor

stemons commented Jul 9, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Terraform pipeline returns permissions error when trying to upload the updated state file to the bucket S3 in the deployment account.

Expected Behavior

Terraform pipeline should be able to upload the updated statefile to the target backend

Current Behavior

Terraform pipeline returns the following error:

111 | Completed 2.9 KiB/2.9 KiB (17.5 KiB/s) with 1 file(s) remaining
112 | upload: ./kms-tf-xxx-20240709115249.log to s3://adf-global-base-deployment-pipelinebucket-10wtxr0gf8mah/kms-tf/tf-plan/2024-07-09/771873470680/kms-tf-xxxx-20240709115249.log
113 | Path to terraform plan s3://adf-global-base-deployment-pipelinebucket-10wtxr0gf8mah/kms-tf/tf-plan/2024-07-09/xxx/kms-tf-xxx-20240709115249.log
114 |  
115 | Error: Failed to save state
116 |  
117 | Error saving state: failed to upload state: AccessDenied: Access Denied
118 | status code: 403, request id: AZ4WMCYZK551JFSE, host id:
119 | zAKYWrBCz/XW6rNfO5mwHMoKMWOvJnBhNLKWOJ1YZzqx+cFqlIsAaQRuCfzhWBFOMEGj7+PCU+IjmyuL2qP84mVMon8zTm47
120 |  
121 | Error: Failed to persist state to backend
122 |  
123 | The error shown above has prevented Terraform from writing the updated state
124 | to the configured backend. To allow for recovery, the state has been written
125 | to the file "errored.tfstate" in the current working directory.
126 |  
127 | Running "terraform apply" again at this point will create a forked state,
128 | making it harder to recover.
129 |  
130 | To retry writing this state, use the following command:
131 | terraform state push errored.tfstate

Steps To Reproduce

No response

Possible Solution

No response

Additional Information/Context

No response

ADF Version

4.0.0

Contributing a fix?

  • Yes, I am working on a fix to resolve this issue
@stemons stemons added the bug Something isn't working label Jul 9, 2024
@sbkok sbkok added this to the v4.0.1 milestone Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants