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

data-source/aws_kms_secret: Soft remove data source type with removal message #7657

Merged
merged 1 commit into from
Feb 25, 2019

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Feb 23, 2019

References:

The aws_kms_secret data source uses dynamic attribute functionality which is not supported in Terraform 0.12 and later. Available since Terraform AWS Provider version 1.29.0, operators should migrate to the aws_kms_secrets data source, which uses a plaintext map attribute. Additional information can be found in the Version 2 Upgrade Guide: https://www.terraform.io/docs/providers/aws/guides/version-2-upgrade.html#data-source-aws_kms_secret

Output from Terraform 0.11 attempted usage:

terraform apply
data.aws_kms_secret.testing: Refreshing state...

Error: Error refreshing state: 1 error(s) occurred:

* data.aws_kms_secret.testing: 1 error(s) occurred:

* data.aws_kms_secret.testing: data.aws_kms_secret.testing: This data source has been replaced with the `aws_kms_secrets` data source. Upgrade information is available at: https://www.terraform.io/docs/providers/aws/guides/version-2-upgrade.html#data-source-aws_kms_secret

Output from Terraform 0.12 attempted usage (we cannot return the proper error message if there are references, however capturing the output here in case some one is searching for this in the future):

$ terraform apply

Error: Unsupported block type

  on main.tf line 10, in data "aws_kms_secret" "testing":
  10:     context {

Blocks of type "context" are not expected here. Did you mean to define
argument "context"? If so, use the equals sign to assign it a value.

$ terraform 0.12upgrade -yes
$ terraform apply

Error: Unsupported attribute

  on main.tf line 17, in output "testing":
  17:   value = data.aws_kms_secret.testing.secret_name

This object has no argument, nested block, or exported attribute named
"secret_name".

Output from Terraform 0.11 acceptance testing:

--- PASS: TestAccAWSKmsSecretDataSource_removed (2.05s)

Output from Terraform 0.12 acceptance testing:

--- PASS: TestAccAWSKmsSecretDataSource_removed (2.18s)

… message

References:
* #5144
* #5195

The `aws_kms_secret` data source uses dynamic attribute functionality which is not supported in Terraform 0.12 and later. Available since Terraform AWS Provider version 1.29.0, operators should migrate to the `aws_kms_secrets` data source, which uses a `plaintext` map attribute. Additional information can be found in the Version 2 Upgrade Guide: https://www.terraform.io/docs/providers/aws/guides/version-2-upgrade.html#data-source-aws_kms_secret

Output from Terraform 0.11 attempted usage:

```
terraform apply
data.aws_kms_secret.testing: Refreshing state...

Error: Error refreshing state: 1 error(s) occurred:

* data.aws_kms_secret.testing: 1 error(s) occurred:

* data.aws_kms_secret.testing: data.aws_kms_secret.testing: This data source has been replaced with the `aws_kms_secrets` data source. Upgrade information is available at: https://www.terraform.io/docs/providers/aws/guides/version-2-upgrade.html#data-source-aws_kms_secret
```

Output from Terraform 0.12 attempted usage (we cannot return the proper error message if there are references, however capturing the output here in case some one is searching for this in the future):

```
$ terraform apply

Error: Unsupported block type

  on main.tf line 10, in data "aws_kms_secret" "testing":
  10:     context {

Blocks of type "context" are not expected here. Did you mean to define
argument "context"? If so, use the equals sign to assign it a value.

$ terraform 0.12upgrade -yes
$ terraform apply

Error: Unsupported attribute

  on main.tf line 17, in output "testing":
  17:   value = data.aws_kms_secret.testing.secret_name

This object has no argument, nested block, or exported attribute named
"secret_name".
```

Output from Terraform 0.11 acceptance testing:

```
--- PASS: TestAccAWSKmsSecretDataSource_removed (2.05s)
```

Output from Terraform 0.12 acceptance testing:

```
--- PASS: TestAccAWSKmsSecretDataSource_removed (2.18s)
```
@bflad bflad added breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. service/kms Issues and PRs that pertain to the kms service. labels Feb 23, 2019
@bflad bflad added this to the v2.0.0 milestone Feb 23, 2019
@bflad bflad requested a review from a team February 23, 2019 00:11
@ghost ghost added size/L Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. labels Feb 23, 2019
@bflad bflad merged commit 38e13f5 into master Feb 25, 2019
@bflad bflad deleted the td-aws_kms_secret-soft-removal branch February 25, 2019 19:04
bflad added a commit that referenced this pull request Feb 25, 2019
@ghost
Copy link

ghost commented Mar 31, 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 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. documentation Introduces or discusses updates to documentation. 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.

2 participants