fix: preserve OCI foundation image defaults
This commit is contained in:
parent
80ce6dd9a2
commit
e98de88213
|
|
@ -325,6 +325,14 @@ export_email_vm_tf_vars() {
|
|||
}
|
||||
|
||||
export_oci_foundation_tf_vars() {
|
||||
# Empty TF_VAR values override Terraform defaults. Remove stale empty image
|
||||
# overrides so the foundation's region-appropriate defaults can apply.
|
||||
if [[ -z "${LAB_OCI_EDGE_IMAGE_ID:-}" && -z "${TF_VAR_edge_image_id:-}" ]]; then
|
||||
unset TF_VAR_edge_image_id
|
||||
fi
|
||||
if [[ -z "${LAB_OCI_EMAIL_IMAGE_ID:-}" && -z "${LAB_EMAIL_IMAGE_ID:-}" && -z "${TF_VAR_email_image_id:-}" ]]; then
|
||||
unset TF_VAR_email_image_id
|
||||
fi
|
||||
export_if_unset TF_VAR_enabled "${LAB_OCI_FOUNDATION_ENABLED:-}"
|
||||
export_if_unset TF_VAR_region "${LAB_OCI_REGION:-${LAB_EMAIL_OCI_REGION:-}}"
|
||||
export_if_unset TF_VAR_oci_config_profile "${LAB_OCI_CONFIG_PROFILE:-${LAB_EMAIL_OCI_CONFIG_PROFILE:-}}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue