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

beta provider fails when setting min_cpu_platform in auto_provisioning_defaults for google_container_cluster #18122

Open
aaronstutzer opened this issue May 14, 2024 · 1 comment
Assignees
Labels

Comments

@aaronstutzer
Copy link

aaronstutzer commented May 14, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Terraform Version & Provider Version(s)

Terraform v1.8.2
on

  • provider registry.terraform.io/hashicorp/google v5.29.0
  • provider registry.terraform.io/hashicorp/google-beta v5.29.0

Affected Resource(s)

google_container_cluster

Terraform Configuration

  cluster_autoscaling {
    enabled = true
    resource_limits {
      resource_type = "cpu"
      minimum       = var.cpu_min
      maximum       = var.cpu_max
    }
    resource_limits {
      resource_type = "memory"
      minimum       = var.memory_min
      maximum       = var.memory_max
    }
    auto_provisioning_defaults {
      service_account = var.sa_gke_nodes
      min_cpu_platform = "Intel Cascade Lake"
      management {
        auto_upgrade = true
      }
      shielded_instance_config {
        enable_integrity_monitoring = true
        enable_secure_boot          = false
      }
    }
  }

Debug Output

2024-05-14T12:21:58.579+0200 [ERROR] provider.terraform-provider-google_v5.29.0_x5: Response contains error diagnostic: tf_resource_type=google_container_cluster @caller=github.com/hashicorp/terraform-plugin-go@v0.22.1/tfprotov5/internal/diag/diagnostics.go:58 diagnostic_detail="" diagnostic_summary="project: required field is not set" tf_proto_version=5.4 tf_provider_addr=registry.terraform.io/hashicorp/google tf_req_id=7e28ccf1-787a-6db6-a0e9-bdbfa3d06968 @module=sdk.proto diagnostic_severity=ERROR tf_rpc=ApplyResourceChange timestamp="2024-05-14T12:21:58.579+0200"
2024-05-14T12:21:58.580+0200 [DEBUG] State storage *remote.State declined to persist a state snapshot
2024-05-14T12:21:58.580+0200 [ERROR] vertex "google_container_cluster.prod" error: project: required field is not set
2024-05-14T12:21:58.580+0200 [DEBUG] states/remote: state read serial is: 202; serial is: 202
2024-05-14T12:21:58.580+0200 [DEBUG] states/remote: state read lineage is: 2aabb3ac-527d-a139-ec90-5a6a1102efc8; lineage is: 2aabb3ac-527d-a139-ec90-5a6a1102efc8

│ Error: project: required field is not set

│ with google_container_cluster.prod,
│ on gke.tf line 72, in resource "google_container_cluster" "prod":
│ 72: resource "google_container_cluster" "prod" {


2024-05-14T12:21:58.958+0200 [DEBUG] provider.terraform-provider-google_v5.29.0_x5: 2024/05/14 12:21:58 [DEBUG] [transport] [server-transport 0x14000162600] Closing: Server.Stop called
2024-05-14T12:21:58.958+0200 [DEBUG] provider.terraform-provider-google_v5.29.0_x5: 2024/05/14 12:21:58 [DEBUG] [transport] [server-transport 0x14000162600] loopyWriter exiting with error: transport closed by client
2024-05-14T12:21:58.959+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-14T12:21:58.964+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/google/5.29.0/darwin_arm64/terraform-provider-google_v5.29.0_x5 pid=82611
2024-05-14T12:21:58.964+0200 [DEBUG] provider: plugin exited

Expected Behavior

new cluster should be deployed with min_cpu_platform "Intel Cascade Lake"

Actual Behavior

when i deploy with google-beta provider i get the above error and terraform terminates.
when i use the google provider the deployment is successful but the min_cpu_platform is ignored.

Steps to reproduce

  1. set min_cpu_platform
  2. terraform apply

Important Factoids

No response

References

google documentation
google_container_cluster documentation

@github-actions github-actions bot added forward/review In review; remove label to forward service/container labels May 14, 2024
@ggtisc ggtisc self-assigned this May 17, 2024
@ggtisc
Copy link
Collaborator

ggtisc commented May 17, 2024

Hi @aaronstutzer!

Please provide your complete terraform code to reproduce this scenario because you only have a little fragment of your code(you can exclude sensitive data, but we need to be sure that you are setting valid values)

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

No branches or pull requests

2 participants