From 3c26638262f7eed72d39af35f4ba0735b26948bb Mon Sep 17 00:00:00 2001 From: unnatinadupalli <156947936+unnatinadupalli@users.noreply.github.com> Date: Fri, 9 Aug 2024 15:08:57 -0700 Subject: [PATCH] adding Default container support for terraform (#11382) --- mmv1/products/parallelstore/Instance.yaml | 21 +++++++++++++---- .../parallelstore_instance_basic.tf.erb | 5 ++-- ...esource_parallelstore_instance_test.go.erb | 23 +++++++++++++++++-- 3 files changed, 39 insertions(+), 10 deletions(-) diff --git a/mmv1/products/parallelstore/Instance.yaml b/mmv1/products/parallelstore/Instance.yaml index c93ef4627711..006d611f2d9c 100644 --- a/mmv1/products/parallelstore/Instance.yaml +++ b/mmv1/products/parallelstore/Instance.yaml @@ -22,7 +22,6 @@ name: Instance description: A Parallelstore Instance. update_verb: :PATCH update_mask: true -min_version: beta autogen_async: true examples: - !ruby/object:Provider::Terraform::Examples @@ -36,14 +35,14 @@ examples: properties: - !ruby/object:Api::Type::String name: name - description: "The resource name of the instance, in the format\n`projects/{project}/locations/{location}/instances/{instance_id}` " + description: "Identifier. The resource name of the instance, in the format\n`projects/{project}/locations/{location}/instances/{instance_id}` " output: true - !ruby/object:Api::Type::String name: description description: 'The description of the instance. 2048 characters or less. ' - !ruby/object:Api::Type::String name: state - description: "The instance state. \n Possible values:\n STATE_UNSPECIFIED\nCREATING\nACTIVE\nDELETING\nFAILED" + description: "The instance state. \n Possible values:\n STATE_UNSPECIFIED\nCREATING\nACTIVE\nDELETING\nFAILED\nUPGRADING" output: true - !ruby/object:Api::Type::String name: createTime @@ -55,6 +54,8 @@ properties: output: true - !ruby/object:Api::Type::KeyValueLabels name: labels + output: + api_name: description: "Cloud Labels are a flexible and lightweight mechanism for organizing cloud\nresources into groups that reflect a customer's organizational needs and\ndeployment strategies. Cloud Labels can be used to filter collections @@ -72,7 +73,7 @@ properties: value would prove problematic if we were to\nallow \"_\" in a future release. " - !ruby/object:Api::Type::String name: capacityGib - description: 'Immutable. Storage capacity of Parallelstore instance in + description: 'Required. Immutable. Storage capacity of Parallelstore instance in Gibibytes (GiB). ' required: true immutable: true @@ -83,7 +84,7 @@ properties: - !ruby/object:Api::Type::Array name: accessPoints item_type: Api::Type::String - description: "List of access_points.\nContains a list of IPv4 addresses + description: "Output only. List of access_points.\nContains a list of IPv4 addresses used for client side configuration. " output: true - !ruby/object:Api::Type::String @@ -106,6 +107,16 @@ properties: and\nand contains the value currently used by the service. " immutable: true output: true + - !ruby/object:Api::Type::String + name: fileStripeLevel + description: "Stripe level for files.\nMIN better suited for small size + files.\nMAX higher throughput performance for larger files. \n Possible values:\n + FILE_STRIPE_LEVEL_UNSPECIFIED\nFILE_STRIPE_LEVEL_MIN\nFILE_STRIPE_LEVEL_BALANCED\nFILE_STRIPE_LEVEL_MAX" + - !ruby/object:Api::Type::String + name: directoryStripeLevel + description: "Stripe level for directories.\nMIN when directory has a + small number of files.\nMAX when directory has a large number of files. \n Possible + values:\n DIRECTORY_STRIPE_LEVEL_UNSPECIFIED\nDIRECTORY_STRIPE_LEVEL_MIN\nDIRECTORY_STRIPE_LEVEL_BALANCED\nDIRECTORY_STRIPE_LEVEL_MAX" parameters: - !ruby/object:Api::Type::String name: location diff --git a/mmv1/templates/terraform/examples/parallelstore_instance_basic.tf.erb b/mmv1/templates/terraform/examples/parallelstore_instance_basic.tf.erb index d58788dd84cf..0c61106bd1bd 100644 --- a/mmv1/templates/terraform/examples/parallelstore_instance_basic.tf.erb +++ b/mmv1/templates/terraform/examples/parallelstore_instance_basic.tf.erb @@ -4,7 +4,8 @@ resource "google_parallelstore_instance" "<%= ctx[:primary_resource_id] %>" { description = "test instance" capacity_gib = 12000 network = google_compute_network.network.name - + file_stripe_level = "FILE_STRIPE_LEVEL_MIN" + directory_stripe_level = "DIRECTORY_STRIPE_LEVEL_MIN" labels = { test = "value" } @@ -19,8 +20,6 @@ resource "google_compute_network" "network" { provider = google-beta } - - # Create an IP address resource "google_compute_global_address" "private_ip_alloc" { name = "<%= ctx[:vars]['address_name'] %>" diff --git a/mmv1/third_party/terraform/services/parallelstore/resource_parallelstore_instance_test.go.erb b/mmv1/third_party/terraform/services/parallelstore/resource_parallelstore_instance_test.go.erb index e336f9d96545..25d15660804d 100644 --- a/mmv1/third_party/terraform/services/parallelstore/resource_parallelstore_instance_test.go.erb +++ b/mmv1/third_party/terraform/services/parallelstore/resource_parallelstore_instance_test.go.erb @@ -1,4 +1,22 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + +// ---------------------------------------------------------------------------- +// +// *** AUTO GENERATED CODE *** Type: MMv1 *** +// +// ---------------------------------------------------------------------------- +// +// This file is automatically generated by Magic Modules and manual +// changes will be clobbered when the file is regenerated. +// +// Please read more about how to change this file in +// .github/CONTRIBUTING.md. +// +// ---------------------------------------------------------------------------- + <% autogen_exception -%> + package parallelstore_test <% unless version == 'ga' -%> @@ -6,8 +24,7 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - - "github.com/hashicorp/terraform-provider-google/google/acctest" + "github.com/hashicorp/terraform-provider-google/google/acctest" ) func TestAccParallelstoreInstance_parallelstoreInstanceBasicExample_update(t *testing.T) { @@ -54,6 +71,8 @@ resource "google_parallelstore_instance" "instance" { capacity_gib = 12000 network = google_compute_network.network.name reserved_ip_range = google_compute_global_address.private_ip_alloc.name + file_stripe_level = "FILE_STRIPE_LEVEL_MIN" + directory_stripe_level = "DIRECTORY_STRIPE_LEVEL_MIN" labels = { test = "value" }