Update google_iap_brand
documentation about import and name formats
#12633
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.
Closes #12600
PR makes the two possible import formats for the
google_iap_brand
resource more explicit.I also updated the description of the
name
attribute as I thought it'd be good to make it clear that it can take the two forms (but I think API returns project number for Read operations). Relevant documentation : https://cloud.google.com/iap/docs/reference/rest/v1/projects.brands/get#body.PATH_PARAMETERS.nameWhen I generated the downstream locally I saw that a third import format is added automatically :
{{project_number}}/{{brand_id}}
I couldn't figure out how to stop this happening, so I implemented the ability to import with that format of ID.I currently don't know how we'd make acceptance tests to test import with the different import formats, because we'd require knowledge of the the project number of the project made in the acceptance test.
For now, I've tested the import manually. See image below.
id
of{{project}}/{{brand_id}}
but the name is set asprojects/{{project}}/brands/{{brand_id}}
If this PR is for Terraform, I acknowledge that I have:
make test
andmake lint
to ensure it passes unit and linter tests.Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).N/ARan relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).N/ARelease Note Template for Downstream PRs (will be copied)
Derived from GoogleCloudPlatform/magic-modules#6586