Skip to content

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 .gitignore file.
  • 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.local to store global environment parameters (such as ADO_ORG_URL, ADO_PROJECT_NAME, ADO_PAT, and GEMINI_API_KEY).

  • Create a file named settings/.dev.vars to store local Wrangler secrets (such as GEMINI_API_KEY).

  • Navigate to the infra/ directory and create terraform.tfvars with:

    text
    cloudflare_account_id = "cc132fd667eecfca3f27f1bdf523e503"
    cloudflare_api_token = "<INSERT_YOUR_API_TOKEN_HERE>"