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_iam_server_cert: does not fail if iam server certificate is not found #5193

Closed

Conversation

ntmggr
Copy link

@ntmggr ntmggr commented Jul 14, 2018

Reference: hashicorp/terraform#16380

Changes proposed in this pull request:

Data source allows search for iam server certificate and return null if it does not exist.
It will continue and it will not error

Output from acceptance testing: AWS Commercial

make testacc TEST=./aws TESTARGS="-run=TestAccAWSDataSourceIAMServerCertificate_matchNamePrefix"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSDataSourceIAMServerCertificate_matchNamePrefix -timeout 120m
=== RUN   TestAccAWSDataSourceIAMServerCertificate_matchNamePrefix
--- PASS: TestAccAWSDataSourceIAMServerCertificate_matchNamePrefix (26.81s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	26.876s

@ghost ghost added the size/XS Managed by automation to categorize the size of a PR. label Jul 14, 2018
@bflad bflad added enhancement Requests to existing resources that expand the functionality or scope. service/iam Issues and PRs that pertain to the iam service. labels Jul 16, 2018
@bflad
Copy link
Contributor

bflad commented Dec 5, 2018

Hi @ntmggr 👋 Thanks for submitting this and sorry for not providing any review since it was submitted.

The current design of Terraform AWS provider "singular" data sources is to always error if the intended AWS resource is not found. There can be unintended side effects with other Terraform functionality if we start allowing create-if-non-existent use cases, among others. This behavior is also consistent across all "singular" data sources at the moment in the provider.

After Terraform core 0.12 is released, I believe there are plans to look further into the desired use cases, ensure all workflows continue to work, and come up with a plan to either address it via changes like these to "singular" data sources (once more thoroughly verified), allow "plural" data sources to handle this case, or introduce new concepts into Terraform itself to better support those use cases. See also: hashicorp/terraform#16380 (comment)

Rather than leaving this pull request open, which won't get accepted and merged at the moment, I'm going to close this in preference of those continuing discussions upstream and to keep the repository with only actionable pull requests open. We can reopen this pull request if those discussions lead to this type of change across the data sources. 👍 Thanks again.

@bflad bflad closed this Dec 5, 2018
@ghost
Copy link

ghost commented Apr 2, 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 2, 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. service/iam Issues and PRs that pertain to the iam service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants