Skip to content

Commit

Permalink
Add support for parameter manager parameter version render datasource…
Browse files Browse the repository at this point in the history
… `google_parameter_manager_parameter_version_render` (#12674) (#21104)

[upstream:a1649f7f7bfc690d638451a8dc32394d18082933]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Jan 30, 2025
1 parent b1cabac commit f6add5d
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/12674.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-datasource
`google_parameter_manager_parameter_version_render`
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package parametermanager
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package parametermanager_test
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
subcategory: "Parameter Manager"
description: |-
Get information about an Parameter Manager Parameter Version Render
---

# google_parameter_manager_parameter_version_render

Get the value and metadata from a Parameter Manager Parameter version with render payload data. For this datasource to work as expected, the principal of the parameter must be provided with the [Secret Manager Secret Accessor](https://cloud.google.com/secret-manager/docs/access-control#secretmanager.secretAccessor) role. For more information see the [official documentation](https://cloud.google.com/secret-manager/parameter-manager/docs/overview) and [API](https://cloud.google.com/secret-manager/parameter-manager/docs/reference/rest/v1/projects.locations.parameters.versions/render).

~> **Warning:** This datasource is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta datasources.

## Example Usage

```hcl
data "google_parameter_manager_parameter_version_render" "basic" {
parameter = "test-parameter"
parameter_version_id = "test-parameter-version"
}
```

## Argument Reference

The following arguments are supported:

* `project` - (Optional) The project for retrieving the Parameter Version. If it's not specified,
the provider project will be used.

* `parameter` - (Required) The Parameter for obtaining the Parameter Version.
This can be either the reference of the parameter as in `projects/{{project}}/locations/global/parameters/{{parameter_id}}` or only the name of the parameter as in `{{parameter_id}}`.

* `parameter_version_id` - (Required) The version of the parameter to get.

## Attributes Reference

The following attributes are exported:

* `parameter_data` - The Parameter data.

* `render_parameter_data` - The Rendered Parameter Data specifies that if you use `__REF__()` to reference a secret and the format is JSON or YAML, the placeholder `__REF__()` will be replaced with the actual secret value. However, if the format is UNFORMATTED, it will stay the same as the original `parameter_data`.

* `name` - The resource name of the ParameterVersion. Format:
`projects/{{project}}/locations/global/parameters/{{parameter_id}}/versions/{{parameter_version_id}}`

* `disabled` - The current state of the Parameter Version.

0 comments on commit f6add5d

Please sign in to comment.