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

Coalesce function introduced in OCM-10689 fails #96

Open
joschi36 opened this issue Oct 3, 2024 · 0 comments
Open

Coalesce function introduced in OCM-10689 fails #96

joschi36 opened this issue Oct 3, 2024 · 0 comments

Comments

@joschi36
Copy link
Contributor

joschi36 commented Oct 3, 2024

Because of 2d4c6d3 I've tried out the recent master branch and the newly added coalesce function for the shared_vpc_role_arn argument added in 796b892 fails.

I'm calling the rosa module without the private_hosted_zone_role_arn argument. See all arguments here. (obfuscated some parts)

module "rosa" {
  # based on 1.6.3. fix required because of https://github.com/terraform-redhat/terraform-rhcs-rosa-classic/commit/2d4c6d3f150fe7e0001a3acbab82542027d161b0
  source  = "github.com/terraform-redhat/terraform-rhcs-rosa-classic?ref=main"

  cluster_name               = var.cluster_name
  openshift_version          = var.rosa_openshift_version
  machine_cidr               = var.vpc_cidr_block
  create_account_roles       = true
  create_operator_roles      = true
  create_oidc                = true
  private                    = true
  aws_private_link           = true
  upgrade_acknowledgements_for = var.upgrade_acknowledgements_for
  admin_credentials_username = xxx
  admin_credentials_password = xxx
  aws_subnet_ids             = var.private_subnets
  aws_availability_zones     = var.availability_zones
  multi_az                   = length(var.availability_zones) > 1
  replicas                   = var.replicas
  compute_machine_type       = "t3a.xlarge"
  identity_providers = {
    "xxx" = {
      xxx
    }
  }

Full error:

Planning failed. OpenTofu encountered an error while generating this plan.

╷
│ Error: Error in function call
│ 
│   on .terraform/modules/install_rosa-test-dev-1.rosa/main.tf line 63, in module "operator_policies":
│   63:   shared_vpc_role_arn = coalesce(local.shared_vpc_role_arn, "")
│     ├────────────────
│     │ while calling coalesce(vals...)
│     │ local.shared_vpc_role_arn is null
│ 
│ Call to function "coalesce" failed: no non-null, non-empty-string arguments.
╵
╷
│ Error: Error in function call
│ 
│   on .terraform/modules/install_rosa-test-int-1.rosa/main.tf line 63, in module "operator_policies":
│   63:   shared_vpc_role_arn = coalesce(local.shared_vpc_role_arn, "")
│     ├────────────────
│     │ while calling coalesce(vals...)
│     │ local.shared_vpc_role_arn is null
│ 
│ Call to function "coalesce" failed: no non-null, non-empty-string arguments.
╵
╷
│ Error: Error in function call
│ 
│   on .terraform/modules/install_rosa_hub-cluster-int.rosa/main.tf line 63, in module "operator_policies":
│   63:   shared_vpc_role_arn = coalesce(local.shared_vpc_role_arn, "")
│     ├────────────────
│     │ while calling coalesce(vals...)
│     │ local.shared_vpc_role_arn is null
│ 
│ Call to function "coalesce" failed: no non-null, non-empty-string arguments.
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