Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fixes an issue where Terraform complains because the default of network and subnetwork is `null`. ``` │ Error: Inconsistent conditional result types │ │ on .terraform/modules/spacelift/main.tf line 6, in locals: │ 6: network = var.enable_network ? module.network.network : var.network │ ├──────────────── │ │ module.network.network is object with 16 attributes │ │ var.enable_network is true │ │ var.network is null │ │ The true and false result expressions must have consistent types. The 'true' value includes object attribute "auto_create_subnetworks", which is absent in the 'false' value. ``` The hack here is to transform those to a tuple and use the ternary operator to set the proper tuple index to use. I'm not sure why I did not catched that while working on it back in December ...
- Loading branch information