diff --git a/mmv1/products/parametermanager/Parameter.yaml b/mmv1/products/parametermanager/Parameter.yaml index 11d0b781cfa5..843fd2dfe471 100644 --- a/mmv1/products/parametermanager/Parameter.yaml +++ b/mmv1/products/parametermanager/Parameter.yaml @@ -15,6 +15,7 @@ name: 'Parameter' description: | A Parameter resource is a logical parameter. +min_version: 'beta' references: guides: api: 'https://cloud.google.com/secret-manager/parameter-manager/docs/reference/rest/v1/projects.locations.parameters' @@ -33,14 +34,17 @@ timeouts: examples: - name: 'parameter_config_basic' primary_resource_id: 'parameter-basic' + min_version: 'beta' vars: parameter_id: 'parameter' - name: 'parameter_with_format' primary_resource_id: 'parameter-with-format' + min_version: 'beta' vars: parameter_id: 'parameter' - name: 'parameter_with_labels' primary_resource_id: 'parameter-with-labels' + min_version: 'beta' vars: parameter_id: 'parameter' parameters: @@ -48,6 +52,7 @@ parameters: type: String description: | This must be unique within the project. + min_version: 'beta' url_param_only: true required: true immutable: true @@ -57,21 +62,25 @@ properties: description: | The resource name of the Parameter. Format: `projects/{{project}}/locations/global/parameters/{{parameter_id}}` + min_version: 'beta' output: true - name: 'createTime' type: String description: | The time at which the Parameter was created. + min_version: 'beta' output: true - name: 'updateTime' type: String description: | The time at which the Parameter was updated. + min_version: 'beta' output: true - name: 'policyMember' type: NestedObject description: | Policy member strings of a Google Cloud resource. + min_version: 'beta' output: true properties: - name: 'iamPolicyUidPrincipal' @@ -81,6 +90,7 @@ properties: 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/global/parameters/{{uid}}` + min_version: 'beta' output: true - name: 'iamPolicyNamePrincipal' type: String @@ -89,6 +99,7 @@ properties: 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/global/parameters/{{parameter_id}}` + min_version: 'beta' output: true - name: 'labels' type: KeyValueLabels @@ -105,10 +116,12 @@ properties: An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. + min_version: 'beta' - name: 'format' type: Enum description: | The format type of the parameter resource. Default value is UNFORMATTED. + min_version: 'beta' default_from_api: true immutable: true enum_values: diff --git a/mmv1/products/parametermanager/product.yaml b/mmv1/products/parametermanager/product.yaml index 485f8f9f93d1..4a0184ba77c7 100644 --- a/mmv1/products/parametermanager/product.yaml +++ b/mmv1/products/parametermanager/product.yaml @@ -15,8 +15,6 @@ name: 'ParameterManager' display_name: 'Parameter Manager' versions: - - name: 'ga' - base_url: 'https://parametermanager.googleapis.com/v1/' - name: 'beta' base_url: 'https://parametermanager.googleapis.com/v1/' scopes: diff --git a/mmv1/templates/terraform/examples/parameter_config_basic.tf.tmpl b/mmv1/templates/terraform/examples/parameter_config_basic.tf.tmpl index 6c1d23e6cad0..b31380eee821 100644 --- a/mmv1/templates/terraform/examples/parameter_config_basic.tf.tmpl +++ b/mmv1/templates/terraform/examples/parameter_config_basic.tf.tmpl @@ -1,3 +1,4 @@ resource "google_parameter_manager_parameter" "{{$.PrimaryResourceId}}" { + provider = google-beta parameter_id = "{{index $.Vars "parameter_id"}}" } diff --git a/mmv1/templates/terraform/examples/parameter_with_format.tf.tmpl b/mmv1/templates/terraform/examples/parameter_with_format.tf.tmpl index ed76d6f0b152..dd78230835a4 100644 --- a/mmv1/templates/terraform/examples/parameter_with_format.tf.tmpl +++ b/mmv1/templates/terraform/examples/parameter_with_format.tf.tmpl @@ -1,4 +1,5 @@ resource "google_parameter_manager_parameter" "{{$.PrimaryResourceId}}" { + provider = google-beta parameter_id = "{{index $.Vars "parameter_id"}}" format = "JSON" } diff --git a/mmv1/templates/terraform/examples/parameter_with_labels.tf.tmpl b/mmv1/templates/terraform/examples/parameter_with_labels.tf.tmpl index c19e2a8d323d..8d990cd7a1a3 100644 --- a/mmv1/templates/terraform/examples/parameter_with_labels.tf.tmpl +++ b/mmv1/templates/terraform/examples/parameter_with_labels.tf.tmpl @@ -1,4 +1,5 @@ resource "google_parameter_manager_parameter" "{{$.PrimaryResourceId}}" { + provider = google-beta parameter_id = "{{index $.Vars "parameter_id"}}" labels = { diff --git a/mmv1/third_party/terraform/services/parametermanager/resource_parameter_manager_parameter_test.go b/mmv1/third_party/terraform/services/parametermanager/resource_parameter_manager_parameter_test.go.tmpl similarity index 93% rename from mmv1/third_party/terraform/services/parametermanager/resource_parameter_manager_parameter_test.go rename to mmv1/third_party/terraform/services/parametermanager/resource_parameter_manager_parameter_test.go.tmpl index aeef52befc03..82bdac95e1a1 100644 --- a/mmv1/third_party/terraform/services/parametermanager/resource_parameter_manager_parameter_test.go +++ b/mmv1/third_party/terraform/services/parametermanager/resource_parameter_manager_parameter_test.go.tmpl @@ -1,4 +1,5 @@ package parametermanager_test +{{- if ne $.TargetVersionName "ga" }} import ( "testing" @@ -16,7 +17,7 @@ func TestAccParameterManagerParameter_import(t *testing.T) { acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t), CheckDestroy: testAccCheckParameterManagerParameterDestroyProducer(t), Steps: []resource.TestStep{ { @@ -35,6 +36,7 @@ func TestAccParameterManagerParameter_import(t *testing.T) { func testAccParameterManagerParameter_import(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_parameter_manager_parameter" "parameter-import" { + provider = google-beta parameter_id = "tf_test_parameter%{random_suffix}" format = "YAML" @@ -58,7 +60,7 @@ func TestAccParameterManagerParameter_labelsUpdate(t *testing.T) { acctest.VcrTest(t, resource.TestCase{ PreCheck: func() { acctest.AccTestPreCheck(t) }, - ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t), + ProtoV5ProviderFactories: acctest.ProtoV5ProviderBetaFactories(t), CheckDestroy: testAccCheckParameterManagerParameterDestroyProducer(t), Steps: []resource.TestStep{ { @@ -104,6 +106,7 @@ func TestAccParameterManagerParameter_labelsUpdate(t *testing.T) { func testAccParameterManagerParameter_withoutLabels(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_parameter_manager_parameter" "parameter-with-labels" { + provider = google-beta parameter_id = "tf_test_parameter%{random_suffix}" format = "JSON" } @@ -113,6 +116,7 @@ resource "google_parameter_manager_parameter" "parameter-with-labels" { func testAccParameterManagerParameter_labelsUpdate(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_parameter_manager_parameter" "parameter-with-labels" { + provider = google-beta parameter_id = "tf_test_parameter%{random_suffix}" format = "JSON" @@ -130,6 +134,7 @@ resource "google_parameter_manager_parameter" "parameter-with-labels" { func testAccParameterManagerParameter_labelsUpdateOther(context map[string]interface{}) string { return acctest.Nprintf(` resource "google_parameter_manager_parameter" "parameter-with-labels" { + provider = google-beta parameter_id = "tf_test_parameter%{random_suffix}" format = "JSON" @@ -143,3 +148,5 @@ resource "google_parameter_manager_parameter" "parameter-with-labels" { } `, context) } + +{{ end }}