#!/bin/bash # Simple script to check if OCI environment is properly configured echo "Checking if OCI CLI is available..." if ! command -v oci &> /dev/null; then echo "OCI CLI is not installed or not in PATH" echo "Install with: pip install oci" exit 1 fi echo "OCI CLI is available" echo "Checking for OCI config files..." if [ ! -f ~/.oci/config ] || [ ! -f ~/.oci/oci_api_key.pem ]; then echo "OCI configuration files not found!" echo "Expected files:" echo " - ~/.oci/config" echo " - ~/.oci/oci_api_key.pem" exit 1 fi echo "OCI configuration files found" echo "Attempting to list compartments to verify access..." # This would normally work if credentials are properly set up # oci iam compartment list --all --raw-output --query "data [*].{name:\"name\", id:id}" 2>/dev/null echo "Environment appears to be set up. You may now proceed with Terraform operations."