Skip to content

Commit

Permalink
Add type field to PrivateCloud in Vmwareengine (#9608)
Browse files Browse the repository at this point in the history
  • Loading branch information
swamitagupta authored Dec 12, 2023
1 parent 0124464 commit e87ca38
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
13 changes: 12 additions & 1 deletion mmv1/products/vmwareengine/PrivateCloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ create_url: 'projects/{{project}}/locations/{{location}}/privateClouds?privateCl
update_verb: :PATCH
references: !ruby/object:Api::Resource::ReferenceLinks
api: 'https://cloud.google.com/vmware-engine/docs/reference/rest/v1/projects.locations.privateClouds'
description: / Represents a private cloud resource. Private clouds are zonal resources.
description: Represents a private cloud resource. Private clouds are zonal resources.
error_abort_predicates: ['transport_tpg.Is429QuotaError']
async: !ruby/object:Api::OpAsync
operation: !ruby/object:Api::OpAsync::Operation
Expand Down Expand Up @@ -285,3 +285,14 @@ properties:
name: 'fqdn'
description: |-
Fully qualified domain name of the appliance.
- !ruby/object:Api::Type::Enum
name: 'type'
description: |
Initial type of the private cloud.
immutable: true
ignore_read: true
values:
- :STANDARD
- :TIME_LIMITED
default_value: :STANDARD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ resource "google_vmwareengine_private_cloud" "<%= ctx[:primary_resource_id] %>"
location = "<%= ctx[:test_env_vars]['region'] %>-a"
name = "<%= ctx[:vars]['private_cloud_id'] %>"
description = "Sample test PC."
type = "TIME_LIMITED"
network_config {
management_cidr = "192.168.30.0/24"
vmware_engine_network = google_vmwareengine_network.pc-nw.id
Expand All @@ -11,7 +12,7 @@ resource "google_vmwareengine_private_cloud" "<%= ctx[:primary_resource_id] %>"
cluster_id = "<%= ctx[:vars]['management_cluster_id'] %>"
node_type_configs {
node_type_id = "standard-72"
node_count = 3
node_count = 1
custom_core_count = 32
}
}
Expand All @@ -21,4 +22,5 @@ resource "google_vmwareengine_network" "pc-nw" {
name = "<%= ctx[:vars]['network_id'] %>"
location = "global"
type = "STANDARD"
description = "PC network description."
description = "PC network description."
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestAccVmwareenginePrivateCloud_vmwareEnginePrivateCloudUpdate(t *testing.T
CheckDestroy: testAccCheckVmwareenginePrivateCloudDestroyProducer(t),
Steps: []resource.TestStep{
{
Config: testPrivateCloudUpdateConfig(context, "description1", 3),
Config: testPrivateCloudUpdateConfig(context, "description1", 1),
Check: resource.ComposeTestCheckFunc(
acctest.CheckDataSourceStateMatchesResourceStateWithIgnores("data.google_vmwareengine_private_cloud.ds", "google_vmwareengine_private_cloud.vmw-engine-pc", map[string]struct{}{}),
testAccCheckGoogleVmwareengineNsxCredentialsMeta("data.google_vmwareengine_nsx_credentials.nsx-ds"),
Expand Down Expand Up @@ -78,6 +78,7 @@ resource "google_vmwareengine_private_cloud" "vmw-engine-pc" {
location = "%{region}-a"
name = "tf-test-sample-pc%{random_suffix}"
description = "%{description}"
type = "TIME_LIMITED"
network_config {
management_cidr = "192.168.30.0/24"
vmware_engine_network = google_vmwareengine_network.default-nw.id
Expand All @@ -104,6 +105,7 @@ data "google_vmwareengine_private_cloud" "ds" {
data "google_vmwareengine_nsx_credentials" "nsx-ds" {
parent = google_vmwareengine_private_cloud.vmw-engine-pc.id
}
data "google_vmwareengine_vcenter_credentials" "vcenter-ds" {
parent = google_vmwareengine_private_cloud.vmw-engine-pc.id
}
Expand Down

0 comments on commit e87ca38

Please sign in to comment.