-
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 datasource `googl…
…e_parameter_manager_parameter_version` (#12653) (#21055) [upstream:79f6fab37290e2c1e0e159d89743fd5739078140] Signed-off-by: Modular Magician <magic-modules@google.com>
- Loading branch information
1 parent
1b930c1
commit 49f4307
Showing
4 changed files
with
57 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` | ||
``` |
3 changes: 3 additions & 0 deletions
3
google/services/parametermanager/data_source_parameter_manager_parameter_version.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
google/services/parametermanager/data_source_parameter_manager_parameter_version_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 |
48 changes: 48 additions & 0 deletions
48
website/docs/d/parameter_manager_parameter_version.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,48 @@ | ||
--- | ||
subcategory: "Parameter Manager" | ||
description: |- | ||
Get information about an Parameter Manager Parameter Version | ||
--- | ||
|
||
# google_parameter_manager_parameter_version | ||
|
||
Get the value and metadata from a Parameter Manager Parameter version. 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). | ||
|
||
~> **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" "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. | ||
|
||
* `name` - The resource name of the ParameterVersion. Format: | ||
`projects/{{project}}/locations/global/parameters/{{parameter_id}}/versions/{{parameter_version_id}}` | ||
|
||
* `create_time` - The time at which the Parameter Version was created. | ||
|
||
* `update_time` - The time at which the Parameter Version was last updated. | ||
|
||
* `disabled` - The current state of the Parameter Version. |