fix: sanitize persisted OCI bastion discovery errors
This commit is contained in:
parent
c38973374a
commit
271703f363
|
|
@ -3737,6 +3737,9 @@ oci_foundation_reconcile_existing() {
|
|||
|
||||
# Existing VCNs may outlive the local state file. Use the VCN owner
|
||||
# compartment for discovery and avoid creating a duplicate Bastion.
|
||||
if [[ "${LAB_OCI_BASTION_ID:-}" == Usage:* || "${LAB_OCI_BASTION_ID:-}" == *"Error:"* ]]; then
|
||||
unset LAB_OCI_BASTION_ID
|
||||
fi
|
||||
if truthy "${LAB_OCI_BASTION_ENABLED:-true}" && [[ -z "${LAB_OCI_BASTION_ID:-}" ]]; then
|
||||
local bastion_compartment_id="${LAB_OCI_COMPARTMENT_ID:-${LAB_OCI_TENANCY_ID:-}}"
|
||||
if [[ -n "${LAB_OCI_EXISTING_VCN_ID:-}" ]]; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue