Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add protocol field for filestore Instance product #10324

Merged
merged 5 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -98,6 +104,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
rileykarson marked this conversation as resolved.
Show resolved Hide resolved
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"
}
}
}
]
]