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

Feature request: New S3 encryption support #2217

Closed
hashibot opened this issue Nov 8, 2017 · 8 comments
Closed

Feature request: New S3 encryption support #2217

hashibot opened this issue Nov 8, 2017 · 8 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope.

Comments

@hashibot
Copy link

hashibot commented Nov 8, 2017

This issue was originally opened by @wayneclancy as hashicorp/terraform#16591. It was migrated here as a result of the provider split. The original body of the issue is below.


Is there any chance we can add support for the new range of AWS S3 server side encryption features?

https://aws.amazon.com/blogs/aws/new-amazon-s3-encryption-security-features/

@trung
Copy link
Contributor

trung commented Nov 9, 2017

Just checked the AWS go SDK, don't see the PUT Bucket Encryption API is there yet. It's in Python SDK for the obvious reason.

Related to aws/aws-sdk-go#1638

Updated: it's in the latest Go SDK. What missing is the documentation

@trung
Copy link
Contributor

trung commented Nov 10, 2017

Proposal:

Reference: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTencryption.html

Couple of places to change:

  1. Data source aws_s3_bucket to read bucket encryption information from the get-bucket-encryption
  2. Resource aws_s3_bucket to allow to allow setting default encryption
    resource "aws_s3_bucket" "foo" {
      encryption {
        sse_algorithm = "aws:kms"
        kms_master_key__id = ""
      }
    }
    This means put-bucket and put-bucket-encryption are used. I am not sure what happen when put-bucket-encryption fails. We may need to have separate resource for the bucket encryption?
  3. Resource aws_s3_bucket to read bucket encryption information from get-bucket-encryption

@randomcamel randomcamel added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 14, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Nov 15, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Nov 15, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Nov 15, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Nov 15, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Nov 16, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Nov 16, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Nov 29, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Nov 29, 2017
psyvision added a commit to psyvision/terraform-provider-aws that referenced this issue Dec 11, 2017
* hashicorp#2217: get default encryption configuration for s3 bucket data source

* hashicorp#2217: added acceptance test for basic case

* hashicorp#2217: documentation
psyvision added a commit to psyvision/terraform-provider-aws that referenced this issue Dec 11, 2017
* hashicorp#2217: updated r/aws_s3_bucket to support default server side encryption configuration

* hashicorp#2217: make fmt
trung added a commit to trung/terraform-provider-aws that referenced this issue Dec 12, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Dec 12, 2017
psyvision added a commit to psyvision/terraform-provider-aws that referenced this issue Dec 12, 2017
* hashicorp#2217: get default encryption configuration for s3 bucket data source

* hashicorp#2217: added acceptance test for basic case

* hashicorp#2217: documentation
psyvision added a commit to psyvision/terraform-provider-aws that referenced this issue Dec 12, 2017
* hashicorp#2217: get default encryption configuration for s3 bucket data source

* hashicorp#2217: added acceptance test for basic case

* hashicorp#2217: documentation
trung added a commit to trung/terraform-provider-aws that referenced this issue Dec 13, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Dec 13, 2017
psyvision added a commit to psyvision/terraform-provider-aws that referenced this issue Dec 13, 2017
* Makefile: Add sweep target

* Add more example and missing field

* docs/elasticache_replication_group: Add missing fields

* Update CHANGELOG.md

* r/aws_dynamodb_table: Ensure ttl is properly read (hashicorp#2452)

* r/aws_dynamodb_table: Ensure ttl is properly read

* r/aws_dynamodb_table: hashicorp#2452 review updates

* Add timeToLiveOutput.TimeToLiveDescription nil check
* Simplify logic to d.Set ttl

* Update CHANGELOG.md

* Bump aws-sdk-go to v.1.12.45

* New Resource: PublicDnsNamespace (hashicorp#2569)

* WIP

* Add test, docs

* Reflect reviews

* Modify error handling

* Update CHANGELOG.md

* New Resource: ServiceDiscovery PrivateDNS Namespace (hashicorp#2589)

* New Resource: service_discovery_private_dns_namespace

* Reflect reviews

* Update CHANGELOG.md

* hashicorp#2217: re-enable default encryption after disabling in via UI

* hashicorp#2217: documentation
trung added a commit to trung/terraform-provider-aws that referenced this issue Dec 14, 2017
jen20 pushed a commit that referenced this issue Dec 17, 2017
jen20 pushed a commit that referenced this issue Dec 17, 2017
jen20 pushed a commit that referenced this issue Dec 17, 2017
jen20 pushed a commit that referenced this issue Dec 17, 2017
jen20 pushed a commit that referenced this issue Dec 17, 2017
jen20 pushed a commit that referenced this issue Dec 17, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Dec 17, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Dec 17, 2017
trung added a commit to trung/terraform-provider-aws that referenced this issue Dec 17, 2017
catsby added a commit that referenced this issue Dec 19, 2017
* master: (147 commits)
  Cleaned Data Sources
  Update CHANGELOG.md
  resource/cognito_user_pool: Update Cognito email message length to 20,000 (#2692)
  Update ecs_service.html.markdown (#2694)
  Documentation: r/ecs_task_definition note about quote escaping container_definition (#2162)
  Cleanup after v1.6.0 release
  v1.6.0
  Make depends_on consistent with note (#2526)
  removing duplicate
  Update CHANGELOG.md
  r/aws_ssm_parameter: Fix arn attribute for full path names and improve testing
  Update CHANGELOG.md
  Update CHANGELOG.md
  s3: Add validation for SSE Algorithm and correct spelling
  #2217: fixed when encryption is AES256
  #2217: documentation
  #2217: re-enable default encryption after disabling in via UI
  #2217: wrote additional acceptance test
  #2217: wrote typical acceptance test
  #2217: make fmt
  ...
@jen20
Copy link
Contributor

jen20 commented Dec 19, 2017

I think this is addressed by #2472 - if anyone feels that there is missing functionality please comment here!

@jen20 jen20 closed this as completed Dec 19, 2017
@bchallenor
Copy link

In case this helps anyone, this means that terraform plan now needs the s3:GetEncryptionConfiguration permission.

trung added a commit to trung/terraform-provider-aws that referenced this issue Jan 17, 2018
@ghost
Copy link

ghost commented Feb 7, 2018

Hi jen20,

I would like to add this SSE feature to a custom terraform module that we have used to create all our s3 buckets.
Due to changed regulations I would like to enable SSE on some of the S3 buckets that were created by this s3 bucket terraform module, because I would like to enable SSE on a few of the S3 buckets I would like to be able to add an empty or disabled S3 server_side_encryption_configuration on the buckets that do not require SSE.
Is there a way to do this now? If not, would it be possible to make this feature optional like for instance like the 'enabled = true' option on the lifecyle rules?
thanks in advance,

@ghost
Copy link

ghost commented Mar 6, 2018

Sorry for the confusion,
let me rephrase;
can we get an enabled Argument on the logging object and the server_side_encryption_configuration object.
as currently exists on for instance the versioning object.
This would help a lot when creating a custom S3 bucket terraform module that allows for optionally configuring server_side_encryption_configuration and/or bucket logging

@ghost
Copy link

ghost commented Apr 7, 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 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope.
Projects
None yet
6 participants