Skip to content

Cannot configure with var.workload_identity_federation = null  #58

@JohannesRudolph

Description

@JohannesRudolph

I have var.workload_identity_federation = null when using the module.

This results in the following error

│ Error: Attempt to get attribute from null value
  │ 
  │   on .terraform/modules/meshplatform_training/variables.tf line 132, in variable "workload_identity_federation":
  │  132:       var.workload_identity_federation.mca_subject == null && var.workload_identity_federation.mca_subjects == null
  │     ├────────────────
  │     │ var.workload_identity_federation is null
  │ 
  │ This value is null, so it does not have any attributes.

The || operator in hcl does not short-circuit: hashicorp/terraform#24128

The culprit is here

We probably have to refactor to use can/coalesce or the condition ?: operator instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions