Skip to content

Docs: google_secret_manager_secrets data resource docs has incomplete list of attributes #24452

@adelinn

Description

@adelinn

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Terraform Version & Provider Version(s)

Terraform v1.13.3
on arm

  • provider registry.terraform.io/hashicorp/google v7.3.0

Affected Resource(s)

google_secret_manager_secrets data resource

Terraform Configuration

data "google_secret_manager_secrets" "main" {
  filter = "name:my-secret-name-prefix-here*"
}

Debug Output

Not relevant

Expected Behavior

The docs should state that the following attributes are also exported:

* `secrets` - A list of secrets matching the filter. Structure is [defined below](#nested_secrets).

<a name="nested_secrets"></a>The `secrets` block supports:

..... the attributes that are already in the docs here.......

* `project` - The **numeric identifier** of the project in which the resource belongs.

* `secret_id` - The resource name of the Secret. Format: `projects/{{project}}/secrets/{{secret_id}}`

* `name` - The resource name of the Secret. Format: `projects/{{project}}/secrets/{{secret_id}}`

* `tags` - A map of resource manager tags.

* `terraform_labels` -
  The combination of labels configured directly on the resource
   and default labels configured on the provider.

* `effective_labels` -
  All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.

* `effective_annotations` -
  All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.

or

* `secrets` - 
  A list of secrets matching the filter. See [google_secret_manager_secret](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/secret_manager_secret) resource for details of all the available attributes in the structure.

Actual Behavior

Docs contain an incomplete list of attributes missing:

  • the fact that the project attribute of the secrets block is the numeric ID,
  • secret_id is missing in the docs, but accessible in terraform
  • name is missing in the docs, but accessible in terraform
  • tags is missing in the docs, but accessible in terraform
  • terraform_labels is missing in the docs, but accessible in terraform
  • effective_labels is missing in the docs, but accessible in terraform
  • effective_annotations is missing in the docs, but accessible in terraform

Steps to reproduce

Not relevant

Important Factoids

Not relevant

References

Not relevant

b/448123385

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions