Skip to content

Commit 3c26638

Browse files
adding Default container support for terraform (#11382)
1 parent 2d8923a commit 3c26638

File tree

3 files changed

+39
-10
lines changed

3 files changed

+39
-10
lines changed

mmv1/products/parallelstore/Instance.yaml

+16-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ name: Instance
2222
description: A Parallelstore Instance.
2323
update_verb: :PATCH
2424
update_mask: true
25-
min_version: beta
2625
autogen_async: true
2726
examples:
2827
- !ruby/object:Provider::Terraform::Examples
@@ -36,14 +35,14 @@ examples:
3635
properties:
3736
- !ruby/object:Api::Type::String
3837
name: name
39-
description: "The resource name of the instance, in the format\n`projects/{project}/locations/{location}/instances/{instance_id}` "
38+
description: "Identifier. The resource name of the instance, in the format\n`projects/{project}/locations/{location}/instances/{instance_id}` "
4039
output: true
4140
- !ruby/object:Api::Type::String
4241
name: description
4342
description: 'The description of the instance. 2048 characters or less. '
4443
- !ruby/object:Api::Type::String
4544
name: state
46-
description: "The instance state. \n Possible values:\n STATE_UNSPECIFIED\nCREATING\nACTIVE\nDELETING\nFAILED"
45+
description: "The instance state. \n Possible values:\n STATE_UNSPECIFIED\nCREATING\nACTIVE\nDELETING\nFAILED\nUPGRADING"
4746
output: true
4847
- !ruby/object:Api::Type::String
4948
name: createTime
@@ -55,6 +54,8 @@ properties:
5554
output: true
5655
- !ruby/object:Api::Type::KeyValueLabels
5756
name: labels
57+
output:
58+
api_name:
5859
description: "Cloud Labels are a flexible and lightweight mechanism for
5960
organizing cloud\nresources into groups that reflect a customer's organizational
6061
needs and\ndeployment strategies. Cloud Labels can be used to filter collections
@@ -72,7 +73,7 @@ properties:
7273
value would prove problematic if we were to\nallow \"_\" in a future release. "
7374
- !ruby/object:Api::Type::String
7475
name: capacityGib
75-
description: 'Immutable. Storage capacity of Parallelstore instance in
76+
description: 'Required. Immutable. Storage capacity of Parallelstore instance in
7677
Gibibytes (GiB). '
7778
required: true
7879
immutable: true
@@ -83,7 +84,7 @@ properties:
8384
- !ruby/object:Api::Type::Array
8485
name: accessPoints
8586
item_type: Api::Type::String
86-
description: "List of access_points.\nContains a list of IPv4 addresses
87+
description: "Output only. List of access_points.\nContains a list of IPv4 addresses
8788
used for client side configuration. "
8889
output: true
8990
- !ruby/object:Api::Type::String
@@ -106,6 +107,16 @@ properties:
106107
and\nand contains the value currently used by the service. "
107108
immutable: true
108109
output: true
110+
- !ruby/object:Api::Type::String
111+
name: fileStripeLevel
112+
description: "Stripe level for files.\nMIN better suited for small size
113+
files.\nMAX higher throughput performance for larger files. \n Possible values:\n
114+
FILE_STRIPE_LEVEL_UNSPECIFIED\nFILE_STRIPE_LEVEL_MIN\nFILE_STRIPE_LEVEL_BALANCED\nFILE_STRIPE_LEVEL_MAX"
115+
- !ruby/object:Api::Type::String
116+
name: directoryStripeLevel
117+
description: "Stripe level for directories.\nMIN when directory has a
118+
small number of files.\nMAX when directory has a large number of files. \n Possible
119+
values:\n DIRECTORY_STRIPE_LEVEL_UNSPECIFIED\nDIRECTORY_STRIPE_LEVEL_MIN\nDIRECTORY_STRIPE_LEVEL_BALANCED\nDIRECTORY_STRIPE_LEVEL_MAX"
109120
parameters:
110121
- !ruby/object:Api::Type::String
111122
name: location

mmv1/templates/terraform/examples/parallelstore_instance_basic.tf.erb

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ resource "google_parallelstore_instance" "<%= ctx[:primary_resource_id] %>" {
44
description = "test instance"
55
capacity_gib = 12000
66
network = google_compute_network.network.name
7-
7+
file_stripe_level = "FILE_STRIPE_LEVEL_MIN"
8+
directory_stripe_level = "DIRECTORY_STRIPE_LEVEL_MIN"
89
labels = {
910
test = "value"
1011
}
@@ -19,8 +20,6 @@ resource "google_compute_network" "network" {
1920
provider = google-beta
2021
}
2122

22-
23-
2423
# Create an IP address
2524
resource "google_compute_global_address" "private_ip_alloc" {
2625
name = "<%= ctx[:vars]['address_name'] %>"

mmv1/third_party/terraform/services/parallelstore/resource_parallelstore_instance_test.go.erb

+21-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
1+
// Copyright (c) HashiCorp, Inc.
2+
// SPDX-License-Identifier: MPL-2.0
3+
4+
// ----------------------------------------------------------------------------
5+
//
6+
// *** AUTO GENERATED CODE *** Type: MMv1 ***
7+
//
8+
// ----------------------------------------------------------------------------
9+
//
10+
// This file is automatically generated by Magic Modules and manual
11+
// changes will be clobbered when the file is regenerated.
12+
//
13+
// Please read more about how to change this file in
14+
// .github/CONTRIBUTING.md.
15+
//
16+
// ----------------------------------------------------------------------------
17+
118
<% autogen_exception -%>
19+
220
package parallelstore_test
321

422
<% unless version == 'ga' -%>
523
import (
624
"testing"
725

826
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9-
10-
"github.com/hashicorp/terraform-provider-google/google/acctest"
27+
"github.com/hashicorp/terraform-provider-google/google/acctest"
1128
)
1229

1330
func TestAccParallelstoreInstance_parallelstoreInstanceBasicExample_update(t *testing.T) {
@@ -54,6 +71,8 @@ resource "google_parallelstore_instance" "instance" {
5471
capacity_gib = 12000
5572
network = google_compute_network.network.name
5673
reserved_ip_range = google_compute_global_address.private_ip_alloc.name
74+
file_stripe_level = "FILE_STRIPE_LEVEL_MIN"
75+
directory_stripe_level = "DIRECTORY_STRIPE_LEVEL_MIN"
5776
labels = {
5877
test = "value"
5978
}

0 commit comments

Comments
 (0)