Skip to content

Cycle Error in terraform apply for autopilot-cluster #2789

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

Closed
1 of 4 tasks
atakanyenel opened this issue Dec 29, 2024 · 0 comments · Fixed by #2790
Closed
1 of 4 tasks

Cycle Error in terraform apply for autopilot-cluster #2789

atakanyenel opened this issue Dec 29, 2024 · 0 comments · Fixed by #2790
Assignees

Comments

@atakanyenel
Copy link

Affected components

  • Fabric modules
  • FAST
  • Blueprints
  • Other

The problem

I'm trying to do the Highly Available Kafka on GKE training in GKE. I'm following the tutorial. I correctly ran terraform init in autopilot-cluster folder but when I try to run terraform apply, I get an error:

│ Error: Cycle: module.project.google_storage_bucket_iam_member.gcs-sinks-binding, module.project.google_project_iam_member.project-sinks-binding, module.project.google_essential_contacts_contact.contact, module.project.google_bigquery_dataset_iam_member.bq-sinks-binding, module.project.google_project_iam_member.bucket-sinks-binding, module.project (close), module.project.output.sink_writer_identities (expand), local.cluster_sa (expand), module.project.var.iam_bindings_additive (expand), module.project.google_project_iam_member.bindings, module.project.google_logging_project_sink.sink, module.project.google_pubsub_topic_iam_member.pubsub-sinks-binding
│

My .terraform.lock.hcl file looks like this:

provider "registry.terraform.io/hashicorp/google" {
  version     = "6.14.1"
  constraints = ">= 6.13.0, < 7.0.0"
  hashes= [
...

provider "registry.terraform.io/hashicorp/google-beta" {
  version     = "6.14.1"
  constraints = ">= 6.13.0, < 7.0.0"
  hashes = [
...

Release version

c176ea1

Terraform version

v1.10.3

Steps to reproduce

Try to create a new GKE cluster with in GCP project with terraform init and terraform deploy within autopilot-cluster folder.

Expected behavior

Cluster is created correctly.

Actual behavior

After running terraform apply in autopilot-cluster folder, I get

│ Error: Cycle: module.project.google_storage_bucket_iam_member.gcs-sinks-binding, module.project.google_project_iam_member.project-sinks-binding, module.project.google_essential_contacts_contact.contact, module.project.google_bigquery_dataset_iam_member.bq-sinks-binding, module.project.google_project_iam_member.bucket-sinks-binding, module.project (close), module.project.output.sink_writer_identities (expand), local.cluster_sa (expand), module.project.var.iam_bindings_additive (expand), module.project.google_project_iam_member.bindings, module.project.google_logging_project_sink.sink, module.project.google_pubsub_topic_iam_member.pubsub-sinks-binding
│

Additional context

No response

@juliocc juliocc self-assigned this Dec 29, 2024
wiktorn added a commit that referenced this issue Dec 29, 2024
Without this change, terraform errors with:
│ Error: Cycle: module.project.google_storage_bucket_iam_member.gcs-sinks-binding, module.project.google_project_iam_member.project-sinks-binding, module.project.google_essential_contacts_contact.contact, module.project.google_bigquery_dataset_iam_member.bq-sinks-binding, module.project.google_project_iam_member.bucket-sinks-binding, module.project (close), module.project.output.sink_writer_identities (expand), local.cluster_sa (expand), module.project.var.iam_bindings_additive (expand), module.project.google_project_iam_member.bindings, module.project.google_logging_project_sink.sink, module.project.google_pubsub_topic_iam_member.pubsub-sinks-binding

The actual error is wrong variable reference.

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

Successfully merging a pull request may close this issue.

2 participants