Skip to content

Commit

Permalink
adding Default container support for terraform (GoogleCloudPlatform#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
unnatinadupalli authored Aug 9, 2024
1 parent 2d8923a commit 3c26638
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 10 deletions.
21 changes: 16 additions & 5 deletions mmv1/products/parallelstore/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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'] %>"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
// 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' -%>
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) {
Expand Down Expand Up @@ -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"
}
Expand Down

0 comments on commit 3c26638

Please sign in to comment.