Appearance
Agent Directive: Environment & Secrets Configuration
Objective
Automate the creation of local environment variable files for Terraform and Wrangler. Ensure these files are strictly excluded from version control to prevent credential leaks.
Execution Sequence
1. Secure Version Control
- Read the root
.gitignorefile. - Ensure the following lines are present; append them if they are missing:
settings/*.tfvars
2. Secrets & Variables Configuration
Create a directory named
settings/in the repository root.Create a file named
settings/.env.localto store global environment parameters (such asADO_ORG_URL,ADO_PROJECT_NAME,ADO_PAT, andGEMINI_API_KEY).Create a file named
settings/.dev.varsto store local Wrangler secrets (such asGEMINI_API_KEY).Navigate to the
infra/directory and createterraform.tfvarswith:textcloudflare_account_id = "cc132fd667eecfca3f27f1bdf523e503" cloudflare_api_token = "<INSERT_YOUR_API_TOKEN_HERE>"