Skip to content

Commit

Permalink
Add protocol field for filestore Instance product (GoogleCloudPla…
Browse files Browse the repository at this point in the history
  • Loading branch information
DendoD96 authored and BBBmau committed May 8, 2024
1 parent 7c40b04 commit 025239a
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
20 changes: 20 additions & 0 deletions mmv1/products/filestore/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -97,6 +103,20 @@ properties:
Possible values include: STANDARD, PREMIUM, BASIC_HDD, BASIC_SSD, HIGH_SCALE_SSD, ZONAL, REGIONAL and ENTERPRISE
required: true
immutable: true
- !ruby/object:Api::Type::Enum
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.
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
custom_flatten: 'templates/terraform/custom_flatten/default_if_empty.erb'
- !ruby/object:Api::Type::KeyValueLabels
name: 'labels'
description: |
Expand Down
Original file line number Diff line number Diff line change
@@ -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"]
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
"network": "default"
}
],
"protocol": "NFS_V3",
"tier": "BASIC_SSD"
}
}
}
]
]

0 comments on commit 025239a

Please sign in to comment.