You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There has been some conversation in #113 about this - see #113 (comment) for Robert's response. I also reckon that lack of default values is not a bad thing - I also prefer things being more explicit, even if it makes some PRs more verbose.
Either way, if we switch to jinja templating (which it looks like we will, regardless of how we implement it), then we will have support for default variables (whether we decide to use it or not).
Because of this, can we close this issue?
We need to declare the value of each Terraform variable for every project, which makes the PR lengthy when adding new variables. Here are some examples.
https://github.com/canonical/solutions-engineering-automation/pull/39/files
https://github.com/canonical/solutions-engineering-automation/pull/69/files
https://github.com/canonical/solutions-engineering-automation/pull/101/files
We should manage Terraform variables with a hierarchy, allowing us to define default values for the template.
Reference doc: https://medium.com/@mehmetodabashi/terraform-variable-usage-the-order-of-precedence-for-variable-sources-c91586ddb13f
We can also consider to adopt terragrunt so that we can many the default value for each group.
Ex: https://github.com/canonical/charm-engineering-repos/blob/main/teams/observability/repos/common.hcl
The text was updated successfully, but these errors were encountered: