From ce6c49d5598adecce1cd7c70a48271d4844f2345 Mon Sep 17 00:00:00 2001 From: Daniele Rossi Date: Fri, 29 Mar 2024 14:31:19 +0100 Subject: [PATCH] Add detailed description. Add new test. --- mmv1/products/filestore/Instance.yaml | 12 +++++++++++- .../filestore_instance_protocol.tf.erb | 18 ++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 mmv1/templates/terraform/examples/filestore_instance_protocol.tf.erb diff --git a/mmv1/products/filestore/Instance.yaml b/mmv1/products/filestore/Instance.yaml index 4cfdbe46f48e..dd9dc7f3924a 100644 --- a/mmv1/products/filestore/Instance.yaml +++ b/mmv1/products/filestore/Instance.yaml @@ -41,6 +41,12 @@ examples: primary_resource_id: 'instance' vars: instance_name: 'test-instance' + - !ruby/object:Provider::Terraform::Examples + name: 'filestore_instance_protocol' + primary_resource_id: 'instance' + min_version: beta + vars: + instance_name: 'test-instance' - !ruby/object:Provider::Terraform::Examples name: 'filestore_instance_enterprise' primary_resource_id: 'instance' @@ -102,8 +108,12 @@ properties: name: 'protocol' description: | Either NFSv3, for using NFS version 3 as file sharing protocol, - or NFSv4.1, for using NFS version 4.1 as file sharing protocol. The default is NFSv3. + or NFSv4.1, for using NFS version 4.1 as file sharing protocol. + NFSv4.1 can be used with HIGH_SCALE_SSD, ZONAL, REGIONAL and ENTERPRISE. + The default is NFSv3. default_value: :NFS_V3 + min_version: 'beta' + immutable: true values: - :NFS_V3 - :NFS_V4_1 diff --git a/mmv1/templates/terraform/examples/filestore_instance_protocol.tf.erb b/mmv1/templates/terraform/examples/filestore_instance_protocol.tf.erb new file mode 100644 index 000000000000..c7cb489a814f --- /dev/null +++ b/mmv1/templates/terraform/examples/filestore_instance_protocol.tf.erb @@ -0,0 +1,18 @@ +resource "google_filestore_instance" "<%= ctx[:primary_resource_id] %>" { + provider = google-beta + name = "<%= ctx[:vars]["instance_name"] %>" + location = "us-central1" + tier = "ENTERPRISE" + protocol = "NFS_V4_1" + + file_shares { + capacity_gb = 1024 + name = "share1" + } + + networks { + network = "default" + modes = ["MODE_IPV4"] + } + +}