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 google_gkeonprem_vmware_admin_cluster resource #12011

Merged

Conversation

naitianliu-google
Copy link
Contributor

Release Note Template for Downstream PRs (will be copied)

Add `google_gkeonprem_vmware_admin_cluster` resource

@github-actions github-actions bot requested a review from trodge October 15, 2024 19:05
Copy link

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@trodge, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 735 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 5 files changed, 4349 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 1297 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_gkeonprem_vmware_admin_cluster (1 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_gkeonprem_vmware_admin_cluster" "primary" {
  addon_node {
    auto_resize_config {
      enabled = # value needed
    }
  }
  annotations = # value needed
  anti_affinity_groups {
    aag_config_disabled = # value needed
  }
  authorization {
    viewer_users {
      username = # value needed
    }
  }
  auto_repair_config {
    enabled = # value needed
  }
  control_plane_node {
    replicas = # value needed
  }
  load_balancer {
    f5_config {
      snat_pool = # value needed
    }
    manual_lb_config {
      addons_node_port              = # value needed
      control_plane_node_port       = # value needed
      ingress_http_node_port        = # value needed
      ingress_https_node_port       = # value needed
      konnectivity_server_node_port = # value needed
    }
    metal_lb_config = # value needed
  }
  network_config {
    ha_control_plane_config {
      control_plane_ip_block {
        gateway = # value needed
        ips {
          hostname = # value needed
          ip       = # value needed
        }
        netmask = # value needed
      }
    }
    host_config {
      dns_search_domains = # value needed
      dns_servers        = # value needed
      ntp_servers        = # value needed
    }
    static_ip_config {
      ip_blocks {
        gateway = # value needed
        ips {
          hostname = # value needed
          ip       = # value needed
        }
        netmask = # value needed
      }
    }
    vcenter_network = # value needed
  }
  platform_config {
    required_platform_version = # value needed
  }
  prepared_secrets {
    enabled = # value needed
  }
  vcenter {
    storage_policy_name = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 21
Passed tests: 19
Skipped tests: 1
Affected tests: 1

Click here to see the affected service packages
  • gkeonprem

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterBasicExample[Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 735 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 5 files changed, 4349 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 1297 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_gkeonprem_vmware_admin_cluster (1 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_gkeonprem_vmware_admin_cluster" "primary" {
  addon_node {
    auto_resize_config {
      enabled = # value needed
    }
  }
  annotations = # value needed
  anti_affinity_groups {
    aag_config_disabled = # value needed
  }
  authorization {
    viewer_users {
      username = # value needed
    }
  }
  auto_repair_config {
    enabled = # value needed
  }
  control_plane_node {
    replicas = # value needed
  }
  load_balancer {
    f5_config {
      snat_pool = # value needed
    }
    manual_lb_config {
      addons_node_port              = # value needed
      control_plane_node_port       = # value needed
      ingress_http_node_port        = # value needed
      ingress_https_node_port       = # value needed
      konnectivity_server_node_port = # value needed
    }
    metal_lb_config = # value needed
  }
  network_config {
    ha_control_plane_config {
      control_plane_ip_block {
        gateway = # value needed
        ips {
          hostname = # value needed
          ip       = # value needed
        }
        netmask = # value needed
      }
    }
    host_config {
      dns_search_domains = # value needed
      dns_servers        = # value needed
      ntp_servers        = # value needed
    }
    static_ip_config {
      ip_blocks {
        gateway = # value needed
        ips {
          hostname = # value needed
          ip       = # value needed
        }
        netmask = # value needed
      }
    }
    vcenter_network = # value needed
  }
  platform_config {
    required_platform_version = # value needed
  }
  prepared_secrets {
    enabled = # value needed
  }
  vcenter {
    storage_policy_name = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 21
Passed tests: 19
Skipped tests: 1
Affected tests: 1

Click here to see the affected service packages
  • gkeonprem

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterBasicExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterBasicExample[Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

Copy link

@trodge This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

@trodge
Copy link
Contributor

trodge commented Oct 21, 2024

The API does not seem to be returning the resource fields in the GET response after the create operation finishes.

The POST request looks like this:

POST /v1/projects/ci-test-project-188019/locations/us-west1/vmwareAdminClusters?alt=json&vmware_admin_cluster_id=basic71762183vq HTTP/1.1
Host: gkeonprem.googleapis.com
User-Agent: Terraform/1.8.3 (+https://www.terraform.io) Terraform-Plugin-SDK/2.33.0 terraform-provider-google-beta/acc
Content-Length: 800
Content-Type: application/json
Accept-Encoding: gzip

{
 "bootstrapClusterMembership": "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
 "controlPlaneNode": {
  "cpus": 4,
  "memory": 8192,
  "replicas": 1
 },
 "description": "test admin cluster",
 "imageType": "ubuntu_containerd",
 "loadBalancer": {
  "f5Config": {
   "address": "10.251.135.22",
   "partition": "test-parition"
  },
  "vipConfig": {
   "addonsVip": "10.251.135.19",
   "controlPlaneVip": "10.251.133.5"
  }
 },
 "networkConfig": {
  "dhcpIpConfig": {
   "enabled": true
  },
  "podAddressCidrBlocks": [
   "192.168.0.0/16"
  ],
  "serviceAddressCidrBlocks": [
   "10.96.0.0/12"
  ]
 },
 "onPremVersion": "1.31.0-gke.35",
 "vcenter": {
  "address": "10.0.0.1",
  "caCertData": "test ca cert data",
  "cluster": "test cluster",
  "dataDisk": "test data disk",
  "datacenter": "test data center",
  "datastore": "test data store",
  "folder": "test folder",
  "resourcePool": "test resource pool"
 }
}

But the GET response looks like this:

{
  "name": "projects/ci-test-project-188019/locations/us-west1/vmwareAdminClusters/basic71762183vq",
  "uid": "3bcd26f7-f51e-4419-b5f1-501685f4c624",
  "etag": "kpSsF3gFDZWsQDA7ICinR-v2zx8AcClIpEj8KhwNPEk",
  "createTime": "2024-10-15T19:26:45.883897966Z",
  "updateTime": "2024-10-15T19:26:45.919645145Z"
}

Any idea why this would be the case?

Copy link

github-actions bot commented Nov 4, 2024

@naitianliu-google, this PR is waiting for action from you. If no action is taken, this PR will be closed in 28 days.

Please address any comments or change requests, or re-request review from a core reviewer if no action is required.

Image showing the re-request review button

This notification can be disabled with the disable-automatic-closure label.

@github-actions github-actions bot requested a review from trodge November 4, 2024 18:22
@naitianliu-google
Copy link
Contributor Author

The API does not seem to be returning the resource fields in the GET response after the create operation finishes.

The POST request looks like this:

POST /v1/projects/ci-test-project-188019/locations/us-west1/vmwareAdminClusters?alt=json&vmware_admin_cluster_id=basic71762183vq HTTP/1.1
Host: gkeonprem.googleapis.com
User-Agent: Terraform/1.8.3 (+https://www.terraform.io) Terraform-Plugin-SDK/2.33.0 terraform-provider-google-beta/acc
Content-Length: 800
Content-Type: application/json
Accept-Encoding: gzip

{
 "bootstrapClusterMembership": "projects/870316890899/locations/global/memberships/gkeonprem-terraform-test",
 "controlPlaneNode": {
  "cpus": 4,
  "memory": 8192,
  "replicas": 1
 },
 "description": "test admin cluster",
 "imageType": "ubuntu_containerd",
 "loadBalancer": {
  "f5Config": {
   "address": "10.251.135.22",
   "partition": "test-parition"
  },
  "vipConfig": {
   "addonsVip": "10.251.135.19",
   "controlPlaneVip": "10.251.133.5"
  }
 },
 "networkConfig": {
  "dhcpIpConfig": {
   "enabled": true
  },
  "podAddressCidrBlocks": [
   "192.168.0.0/16"
  ],
  "serviceAddressCidrBlocks": [
   "10.96.0.0/12"
  ]
 },
 "onPremVersion": "1.31.0-gke.35",
 "vcenter": {
  "address": "10.0.0.1",
  "caCertData": "test ca cert data",
  "cluster": "test cluster",
  "dataDisk": "test data disk",
  "datacenter": "test data center",
  "datastore": "test data store",
  "folder": "test folder",
  "resourcePool": "test resource pool"
 }
}

But the GET response looks like this:

{
  "name": "projects/ci-test-project-188019/locations/us-west1/vmwareAdminClusters/basic71762183vq",
  "uid": "3bcd26f7-f51e-4419-b5f1-501685f4c624",
  "etag": "kpSsF3gFDZWsQDA7ICinR-v2zx8AcClIpEj8KhwNPEk",
  "createTime": "2024-10-15T19:26:45.883897966Z",
  "updateTime": "2024-10-15T19:26:45.919645145Z"
}

Any idea why this would be the case?

Thanks for checking! This is due to an issue of our API backend. The issue has been fixed. The tests should work

@naitianliu-google
Copy link
Contributor Author

@trodge Could you please help guide how to support empty message in terraform? We have a field metal_lb_config which only requires to provide an empty message, but it seems not supported in terraform. Do we have to add "enabled" subfield inside on API surface? Is there any workaround to bypass?

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 866 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 6 files changed, 4635 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 1287 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_gkeonprem_vmware_admin_cluster (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_gkeonprem_vmware_admin_cluster" "primary" {
  load_balancer {
    metal_lb_config {
      enabled = # value needed
    }
  }
}

1 similar comment
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 866 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 6 files changed, 4635 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 1287 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_gkeonprem_vmware_admin_cluster (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_gkeonprem_vmware_admin_cluster" "primary" {
  load_balancer {
    metal_lb_config {
      enabled = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 23
Passed tests: 19
Skipped tests: 1
Affected tests: 3

Click here to see the affected service packages
  • gkeonprem

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterBasicExample
  • TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterFullExample
  • TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterMetallbExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterBasicExample [Debug log]
TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterFullExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterMetallbExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 23
Passed tests: 19
Skipped tests: 1
Affected tests: 3

Click here to see the affected service packages
  • gkeonprem

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterBasicExample
  • TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterFullExample
  • TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterMetallbExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterBasicExample [Debug log]
TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterFullExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🔴 Tests failed during RECORDING mode:
TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterMetallbExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 866 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 6 files changed, 4635 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 1287 insertions(+))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_gkeonprem_vmware_admin_cluster (3 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_gkeonprem_vmware_admin_cluster" "primary" {
  load_balancer {
    metal_lb_config {
      enabled = # value needed
    }
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 23
Passed tests: 21
Skipped tests: 1
Affected tests: 1

Click here to see the affected service packages
  • gkeonprem

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterMetallbExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🔴 Tests failed during RECORDING mode:
TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterMetallbExample [Error message] [Debug log]

🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR.

View the build log or the debug log for each test

@trodge
Copy link
Contributor

trodge commented Nov 4, 2024

@trodge Could you please help guide how to support empty message in terraform? We have a field metal_lb_config which only requires to provide an empty message, but it seems not supported in terraform. Do we have to add "enabled" subfield inside on API surface? Is there any workaround to bypass?

You could try using send_empty_value, but I'm not sure if it will work properly for a nested object. We would generally prefer to have an enabled subfield.

Copy link

github-actions bot commented Nov 7, 2024

@trodge This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link

@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 1 week. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link

@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 2 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 868 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 6 files changed, 4639 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 1287 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 23
Passed tests: 19
Skipped tests: 1
Affected tests: 3

Click here to see the affected service packages
  • gkeonprem

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterBasicExample
  • TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterFullExample
  • TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterMetallbExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterBasicExample [Debug log]
TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterFullExample [Debug log]
TestAccGkeonpremVmwareAdminCluster_gkeonpremVmwareAdminClusterMetallbExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@naitianliu-google
Copy link
Contributor Author

@trodge We have fixed the all issues mentioned in the PR. Could you please help take a look? Thanks!

Copy link

@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 3 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link

github-actions bot commented Dec 2, 2024

@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 4 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link

github-actions bot commented Dec 9, 2024

@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 5 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link

@GoogleCloudPlatform/terraform-team @trodge This PR has been waiting for review for 6 weeks. Please take a look! Use the label disable-review-reminders to disable these notifications.

@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 2 files changed, 868 insertions(+), 1 deletion(-))
google-beta provider: Diff ( 6 files changed, 4643 insertions(+), 3 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 1287 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 23
Passed tests: 22
Skipped tests: 1
Affected tests: 0

Click here to see the affected service packages
  • gkeonprem

🟢 All tests passed!

View the build log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants