d/tfe_project
: Ignore case when matching project name
#958
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #882.
This PR performs case-insensitive matching when reading the list of projects from the Projects List API for the
tfe_project
data source.There was a potential issue where a project would not be found in the API response when the name attribute didn't match the case of the existing project exactly. For example, given an organization with a project 'Hello There', this data source would fail to read a matching project, despite its presence in the API response:
Request:
Response:
Because project names in TFC have to be unique without regard to case, it makes sense to match the project name case-insensitively.
Remember to:
Update the Change Log
Update the Documentation
Testing plan
Foo
tfe_project
data source with lowercase namefoo
, e.g.:terraform apply
External links
Include any links here that might be helpful for people reviewing your PR. If there are none, feel free to delete this section.
Output from acceptance tests
Please run applicable acceptance tests locally and include the output here. See testing.md to learn how to run acceptance tests.
If you are an external contributor, your contribution(s) will first be reviewed before running them against the project's CI pipeline.