fix: sanitize persisted OCI bastion discovery errors

This commit is contained in:
juvenal.diaz 2026-10-27 16:00:42 -06:00
parent c38973374a
commit 271703f363
1 changed files with 3 additions and 0 deletions

View File

@ -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