fix: honor OCI foundation state file during reconciliation
This commit is contained in:
parent
593a06b170
commit
be89319a1f
|
|
@ -3639,9 +3639,9 @@ oci_foundation_save_config() {
|
|||
|
||||
oci_foundation_reconcile_existing() {
|
||||
local oci_bin="" output_file status compartment_id compartment_name
|
||||
local homelab_state_file="${REPO_ROOT}/bootstrap/oci/terraform.tfstate"
|
||||
local homelab_state_file="${LAB_OCI_FOUNDATION_STATE_FILE:-${REPO_ROOT}/bootstrap/oci/terraform.tfstate}"
|
||||
local homelab_compartment_managed=false
|
||||
if [[ -f "${homelab_state_file}" ]] && grep -q 'oci_identity_compartment.homelab' "${homelab_state_file}"; then
|
||||
if [[ -f "${homelab_state_file}" ]] && grep -q '"type"[[:space:]]*:[[:space:]]*"oci_identity_compartment"' "${homelab_state_file}"; then
|
||||
homelab_compartment_managed=true
|
||||
fi
|
||||
if command -v oci >/dev/null 2>&1; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue