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

Provider Returns a Count Error When Trying to Destroy a Cluster #719

Open
TripleMalahat opened this issue Jul 16, 2024 · 0 comments
Open

Comments

@TripleMalahat
Copy link

Expected Behavior

Terraform plan --destroy completes successfully and returns a plan.

Current Behavior

When running terraform plan --destroy, the RHCS provider module for operator roles returns the following error and does not generate a plan:

│ Error: Invalid count argument

│ on .terraform/modules/rosa-cluster.operator_roles/main.tf line 64, in module "rosa_account_roles":
│ 64: count = var.create_account_roles && null_resource.validate_openshift_version != null ? 1 : 0

│ The "count" value depends on resource attributes that cannot be determined
│ until apply, so Terraform cannot predict how many instances will be
│ created. To work around this, use the -target argument to first apply only
│ the resources that the count depends on.

Steps to Reproduce

  1. Deploy a new ROSA cluster using Terraform
  2. Run terraform plan --destroy to destroy the newly created cluster

Environment

Cloud:

  • AWS w/S3 backend

Terraform Version:

  • 1.9.2

Provider Versions:

  • Installing hashicorp/aws v5.58.0...
  • Installing terraform-redhat/rhcs v1.6.2...
  • Installing hashicorp/azurerm v3.112.0...
  • Installing hashicorp/random v3.6.2...
  • Installing hashicorp/time v0.11.2...
  • Installing hashicorp/null v3.2.2...
  • Installing hashicorp/azuread v2.53.1...
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

No branches or pull requests

1 participant