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

aws_s3_bucket server_side_encryption_configuration key is not recognized #2704

Closed
icornett opened this issue Dec 19, 2017 · 6 comments
Closed

Comments

@icornett
Copy link

icornett commented Dec 19, 2017

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.
Terraform v0.11.1

Affected Resource(s)

Please list the resources as a list, for example:

  • opc_instance
  • opc_storage_volume

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

  • aws_s3_bucket

Terraform Configuration Files

resource "aws_s3_bucket" "sample-state-bucket" {
  bucket = "upwork-demo-${var.environmentName}"
  
  versioning {
    enabled = true
  }

  server_side_encryption_configuration {
    rule {
      apply_server_side_encryption_by_default {
        sse_algorithm     = "aws:kms"
      }
    }
  }

  tags {
    Environment = "${var.environmentName}"
  }

  lifecycle {
    #    prevent_destroy = true
  }
}

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
https://gist.github.com/icornett/2873038776bcf9be8211f4047e587e8c

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

What should have happened?
S3 bucket should be created with encryption, per documentation

Actual Behavior

What actually happened?

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform plan

Important Factoids

Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:

@trung
Copy link
Contributor

trung commented Dec 19, 2017

You are using a very old version of terraform-provider-aws: terraform-provider-aws_v1.3.1_x4
Please take the latest 1.6.0 which supports server_side_encryption_configuration

@icornett
Copy link
Author

icornett commented Dec 19, 2017 via email

@trung
Copy link
Contributor

trung commented Dec 20, 2017

By design it won't perform auto upgrade unless being asked.
You can find out more info at https://www.terraform.io/docs/commands/init.html under Plugin Installation section

@jen20
Copy link
Contributor

jen20 commented Dec 29, 2017

Hi @icornett, @trung is correct here - you'll need to update the provider with terraform init to a newer version. Thanks for opening an issue!

@jen20 jen20 closed this as completed Dec 29, 2017
@richfromm
Copy link

richfromm commented Jan 10, 2018

I am using Terraform v0.11.1 and provider.aws v1.6.0. I specified the latter with:

provider "aws" {
   version = "~> 1.6"

When running terraform init, I see it grabbing the requested version of the provider:

Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
- Downloading plugin for provider "aws" (1.6.0)...

Terraform has been successfully initialized!

But I still get the same error that was reported here:

invalid or unknown key: server_side_encryption_configuration

UPDATE: Sorry! I was specifying this on a aws_s3_bucket_policy, not aws_s3_bucket. I moved it, and now it works fine.

@ghost
Copy link

ghost commented Apr 8, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants