- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
56 lines
1.9 KiB
Bash
Executable File
56 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Fix Resource Group Naming Conventions
|
|
|
|
set -e
|
|
|
|
cd "$(dirname "$0")/../.."
|
|
|
|
# Color codes
|
|
|
|
echo "==================================================================="
|
|
echo " FIXING RESOURCE GROUP NAMING CONVENTIONS"
|
|
echo "==================================================================="
|
|
|
|
# Expected naming convention: {cloud}-{env}-{region}-rg-{type}-{instance}
|
|
# Example: az-p-we-rg-comp-001
|
|
|
|
EXPECTED_PATTERN="^az-[pdt]-[a-z]+-rg-(net|comp|stor|sec|mon|tfstate)-[0-9]{3}$"
|
|
|
|
log_info "Current Resource Groups:"
|
|
|
|
az group list --query "[].name" -o tsv | while read -r rg; do
|
|
if [[ "$rg" =~ $EXPECTED_PATTERN ]]; then
|
|
log_success "✅ $rg (correct)"
|
|
else
|
|
log_warn "⚠️ $rg (needs review)"
|
|
fi
|
|
done
|
|
|
|
log_info "Checking Terraform configuration..."
|
|
|
|
# Check terraform.tfvars
|
|
if [ -f terraform/terraform.tfvars ]; then
|
|
RG_NAME=$(grep -E "^resource_group_name" terraform/terraform.tfvars | head -1 | sed 's/.*= *"\([^"]*\)".*/\1/' | tr -d ' ')
|
|
|
|
if [ -n "$RG_NAME" ] && [ "$RG_NAME" != "" ]; then
|
|
if [[ "$RG_NAME" =~ $EXPECTED_PATTERN ]]; then
|
|
log_success "✅ terraform.tfvars resource_group_name: $RG_NAME"
|
|
else
|
|
log_warn "⚠️ terraform.tfvars resource_group_name: $RG_NAME"
|
|
echo " Expected pattern: az-p-we-rg-comp-001"
|
|
fi
|
|
else
|
|
log_success "✅ terraform.tfvars uses default naming (empty)"
|
|
fi
|
|
fi
|
|
|
|
log_info "Standard naming convention:"
|
|
echo " Format: {cloud}-{env}-{region}-rg-{type}-{instance}"
|
|
echo " Example: az-p-we-rg-comp-001"
|
|
echo " Where:"
|
|
echo " cloud = az (Azure)"
|
|
echo " env = p (prod), d (dev), t (test), s (staging)"
|
|
echo " region = we (westeurope), ne (northeurope), etc."
|
|
echo " type = comp (compute), net (network), stor (storage), sec (security), mon (monitoring), tfstate (terraform state)"
|
|
echo " instance = 001, 002, etc."
|