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_kms_ciphertext into new resource keeping datasource #6993

Merged
merged 6 commits into from
Mar 26, 2019

Conversation

cperilla-rival
Copy link
Contributor

Fixes #960

As a resource, the encryption is performed on create only.

Changing any of the input forces a new resource.

Rework of PR#2568

@ghost ghost added size/L Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. service/kms Issues and PRs that pertain to the kms service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Dec 27, 2018
@jbergknoff-rival
Copy link
Contributor

@gazoakley would you please re-review when you have a chance?

@bflad bflad added the new-resource Introduces a new resource. label Mar 26, 2019
@bflad bflad added this to the v2.4.0 milestone Mar 26, 2019
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @cperilla-rival 👋 Thanks for submitting this. There are a few minor things below, but I will take care of them in a commit after yours during merge so we can get this released this week. 🚀

--- PASS: TestAccResourceAwsKmsCiphertext_basic (38.43s)
--- PASS: TestAccResourceAwsKmsCiphertext_validate (42.08s)
--- PASS: TestAccResourceAwsKmsCiphertext_validate_withContext (40.76s)


return &schema.Resource{
Create: resourceAwsKmsCiphertextCreate,
Read: resourceAwsKmsCiphertextRead,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I believe we can replace the empty custom functions with schema.Noop 👍

}

const testAccResourceAwsKmsCiphertextConfig_basic = `
provider "aws" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Including the provider configurations for most acceptance testing is extraneous


# Resource: aws_kms_ciphertext

The KMS ciphertext resource allows you to encrypt plaintext into ciphertext
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: We should include a cross referencing link to the aws_kms_ciphertext data source and explain the difference between the two.

is_enabled = true
}

data "aws_kms_ciphertext" "foo" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These test configurations should reference the resource not data source.

@bflad bflad merged commit ace7dfc into hashicorp:master Mar 26, 2019
bflad added a commit that referenced this pull request Mar 26, 2019
bflad added a commit that referenced this pull request Mar 26, 2019
@cperilla-rival cperilla-rival deleted the cyphertext-resource branch March 26, 2019 14:05
@bflad
Copy link
Contributor

bflad commented Mar 29, 2019

This has been released in version 2.4.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@ghost
Copy link

ghost commented Mar 30, 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 Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/kms Issues and PRs that pertain to the kms service. size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_kms_ciphertext 'unstable' output
4 participants