-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for parameter manager parameter version render datasource…
… `google_parameter_manager_parameter_version_render` (#12674) (#21104) [upstream:a1649f7f7bfc690d638451a8dc32394d18082933] Signed-off-by: Modular Magician <magic-modules@google.com>
- Loading branch information
1 parent
b1cabac
commit f6add5d
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:new-datasource | ||
`google_parameter_manager_parameter_version_render` | ||
``` |
3 changes: 3 additions & 0 deletions
3
google/services/parametermanager/data_source_parameter_manager_parameter_version_render.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
3 changes: 3 additions & 0 deletions
3
.../services/parametermanager/data_source_parameter_manager_parameter_version_render_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
46 changes: 46 additions & 0 deletions
46
website/docs/d/parameter_manager_parameter_version_render.html.markdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |