-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Remote config S3 Server Side Encryption not working #3692
Comments
Hi @coen-hyde provider "aws" {
region = "us-east-1"
}
resource "aws_s3_bucket" "state" {
bucket = "tf_test_state_bucket"
acl = "private"
}
resource "aws_vpc" "test" {
cidr_block = "10.0.0.0/16"
} $ terraform apply
export STATE_BUCKET=tf_test_state_bucket
export DEPLOYMENT=terraform
terraform remote config \
--backend=s3 \
--backend-config="region=us-east-1" \
--backend-config="bucket=${STATE_BUCKET}" \
--backend-config="key=${DEPLOYMENT}.tfstate" \
--backend-config="encrypt=1"
$ aws s3api head-object --bucket=${STATE_BUCKET} --key=${DEPLOYMENT}.tfstate {
"AcceptRanges": "bytes",
"ContentType": "application/json",
"LastModified": "Tue, 26 Jan 2016 07:44:11 GMT",
"ContentLength": 2037,
"ETag": "\"03393fbb238ce6635efa978d045be550\"",
"ServerSideEncryption": "AES256",
"Metadata": {}
} As you can see in the last JSON output, the object is encrypted using AES256. In case you'd like to use your own KMS key to encrypt it, you can use Feel free to reopen or open a new issue if you're still having issues with this, ideally with repro steps, like I did above. |
@radeksimko I noticed this started working. I'm on 0.6.9. At the time i reported this, I think i was on 0.6.6. |
I just experienced a similar issue in terraform 0.9.11.
then called
after that the encryption wasn't enabled. |
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. |
I'm attempting to use SSE with S3 to store the Terraform state file. But the state file is not being encrypted. Here is my terraform config setup.
The text was updated successfully, but these errors were encountered: