magic-modules icon indicating copy to clipboard operation
magic-modules copied to clipboard

Doc clarification for ID/Name

Open drandell opened this issue 3 years ago • 5 comments

Fixes: https://github.com/hashicorp/terraform-provider-google/issues/10983

I've added a new attr to the resource class, so we can differentiate between resources that just use an id (because the API does not output name) and the name output. The common standard seen in most outputs is

  • id - an identifier for the resource with format {{name}}

Now it will look like

  • id - an identifier for the resource with format {{name}}, see {{name}} below for details

Also, minor fixes for the Dialogflow docs which specify format with projects/<KEYWORD/ID> within <> which doesn't render (see example - https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/dialogflow_cx_agent )

If this PR is for Terraform, I acknowledge that I have:

  • [x] Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • [x] Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • [x] 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).
  • [ ] Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • [ ] Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)


drandell avatar Feb 01 '22 21:02 drandell

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@melinath, please review this PR or find an appropriate assignee.

modular-magician avatar Feb 01 '22 21:02 modular-magician

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 253 files changed, 345 insertions(+), 126 deletions(-)) Terraform Beta: Diff ( 256 files changed, 356 insertions(+), 137 deletions(-)) TF Validator: Diff ( 254 files changed, 346 insertions(+), 127 deletions(-)) TF OiCS: Diff ( 1 file changed, 8 insertions(+), 8 deletions(-))

modular-magician avatar Feb 01 '22 21:02 modular-magician

Assigning to Riley since this has significant changes to the generation code

melinath avatar Feb 01 '22 21:02 melinath

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 42 files changed, 128 insertions(+), 126 deletions(-)) Terraform Beta: Diff ( 45 files changed, 139 insertions(+), 137 deletions(-)) TF Validator: Diff ( 43 files changed, 129 insertions(+), 127 deletions(-)) TF OiCS: Diff ( 1 file changed, 8 insertions(+), 8 deletions(-))

modular-magician avatar Feb 02 '22 19:02 modular-magician

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 42 files changed, 125 insertions(+), 123 deletions(-)) Terraform Beta: Diff ( 45 files changed, 136 insertions(+), 134 deletions(-)) TF Validator: Diff ( 43 files changed, 126 insertions(+), 124 deletions(-)) TF OiCS: Diff ( 1 file changed, 8 insertions(+), 8 deletions(-))

modular-magician avatar Feb 02 '22 20:02 modular-magician