From 7a78213f045fcfdb4481f474f69b8a47c30cbb83 Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 17 Jan 2025 13:09:43 -0800 Subject: [PATCH] Add support for parameter manager regional parameters datasource `google_parameter_manager_regional_parameters` (#12651) (#20958) [upstream:eae83792920ab7e4acc6f5e65c06413c8ecbd7d9] Signed-off-by: Modular Magician --- .changelog/12651.txt | 3 + ...e_parameter_manager_regional_parameters.go | 3 + ...ameter_manager_regional_parameters_test.go | 3 + ..._manager_regional_parameters.html.markdown | 67 +++++++++++++++++++ 4 files changed, 76 insertions(+) create mode 100644 .changelog/12651.txt create mode 100644 google/services/parametermanagerregional/data_source_parameter_manager_regional_parameters.go create mode 100644 google/services/parametermanagerregional/data_source_parameter_manager_regional_parameters_test.go create mode 100644 website/docs/d/parameter_manager_regional_parameters.html.markdown diff --git a/.changelog/12651.txt b/.changelog/12651.txt new file mode 100644 index 00000000000..279ed0e6c8c --- /dev/null +++ b/.changelog/12651.txt @@ -0,0 +1,3 @@ +```release-note:new-datasource +`google_parameter_manager_regional_parameters` +``` \ No newline at end of file diff --git a/google/services/parametermanagerregional/data_source_parameter_manager_regional_parameters.go b/google/services/parametermanagerregional/data_source_parameter_manager_regional_parameters.go new file mode 100644 index 00000000000..58f4205ce78 --- /dev/null +++ b/google/services/parametermanagerregional/data_source_parameter_manager_regional_parameters.go @@ -0,0 +1,3 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +package parametermanagerregional diff --git a/google/services/parametermanagerregional/data_source_parameter_manager_regional_parameters_test.go b/google/services/parametermanagerregional/data_source_parameter_manager_regional_parameters_test.go new file mode 100644 index 00000000000..70f4ca3baaf --- /dev/null +++ b/google/services/parametermanagerregional/data_source_parameter_manager_regional_parameters_test.go @@ -0,0 +1,3 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 +package parametermanagerregional_test diff --git a/website/docs/d/parameter_manager_regional_parameters.html.markdown b/website/docs/d/parameter_manager_regional_parameters.html.markdown new file mode 100644 index 00000000000..4ab44990f5e --- /dev/null +++ b/website/docs/d/parameter_manager_regional_parameters.html.markdown @@ -0,0 +1,67 @@ +--- +subcategory: "Parameter Manager" +description: |- + List the Parameter Manager Regional Parameters. +--- + +# google_parameter_manager_regional_parameters + +Use this data source to list the Parameter Manager Regional Parameters + +~> **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_regional_parameters" "regional-parameters" { + location = "us-central1" +} +``` + +## Argument Reference + +The following arguments are supported: + +- `project` - (optional) The ID of the project. + +- `filter` - (optional) Filter string, adhering to the rules in List-operation filtering. List only parameters matching the filter. If filter is empty, all regional parameters are listed. + +- `location` - (Required) The location of regional parameter. + + +## Attributes Reference + +In addition to the arguments listed above, the following computed attributes are +exported: + +- `parameters` - A list of regional parameters matching the filter. Structure is [defined below](#nested_parameters). + +The `parameters` block supports: + +- `format` - The format type of the regional parameter. + +- `labels` - The labels assigned to the regional parameter. + +- `create_time` - The time at which the regional parameter was created. + +- `update_time` - The time at which the regional parameter was updated. + +- `project` - The ID of the project in which the resource belongs. + +- `parameter_id` - The unique name of the resource. + +- `name` - The resource name of the regional parameter. Format: `projects/{{project}}/locations/{{location}}/parameters/{{parameter_id}}` + +- `policy_member` - An object containing a unique resource identity tied to the regional parameter. Structure is [documented below](#nested_policy_member). + +The `policy_member` block contains: + +* `iam_policy_uid_principal` - IAM policy binding member referring to a Google Cloud resource by system-assigned unique identifier. +If a resource is deleted and recreated with the same name, the binding will not be applicable to the +new resource. Format: +`principal://parametermanager.googleapis.com/projects/{{project}}/uid/locations/{{location}}/parameters/{{uid}}` + +* `iam_policy_name_principal` - AM policy binding member referring to a Google Cloud resource by user-assigned name. If a resource is deleted and recreated with the same name, the binding will be applicable to the +new resource. Format: +`principal://parametermanager.googleapis.com/projects/{{project}}/name/locations/{{location}}/parameters/{{parameter_id}}` \ No newline at end of file