Interactive setup wizard for configuring a new app created from this template. Guides through language selection, placeholder replacement, and validation.
This skill helps users configure their container app repository after creating it from the template.
/setup-app
Interactive setup wizard for configuring your container app. Guides you through:
When invoked, follow this workflow:
Ask the user which language they want to use:
Welcome to the Container App Template setup!
Which language will your app use?
1. Node.js (Express)
2. Python (FastAPI)
3. Java (Spring Boot)
Use AskUserQuestion to get their choice.
After they choose a language, collect the following values using AskUserQuestion (you can ask multiple at once):
Required values:
APP_NAME - Application name (lowercase, hyphens only, 3-48 chars). Example: my-apiAzure tags (required for all resources):
COST_CENTER - Cost center code in format XXX.XXXX.XXXXX.XXXX. Example: 100.0000.99010.4315DATA_SECURITY - Data security classification: C-IU (Internal Use), C-LD (Limited Distribution), C-Re (Confidential Restricted), or Public (Public)OWNER - Team or individual owner name. Example: Cloud ComputeAzure values:
RESOURCE_GROUP - Azure resource group name. Example: rg-myapp-dev-scus-01ENVIRONMENT_ID - Container Apps Environment resource IDACR_SERVER - Azure Container Registry URL. Example: myacr.azurecr.ioNote:
subscription_id,tenant_id,client_id, andclient_secretare provided by GitHub Actions secrets/variables - do not prompt for these.
Optional:
AUTH_CLIENT_ID - Azure AD App Registration Client ID for authentication. Can skip if auth not needed.Validate the inputs:
APP_NAME: Must match ^[a-z0-9-]{3,48}$COST_CENTER: Must match ^\d{3}\.\d{4}\.\d{5}\.\d{4}$ (e.g., 100.0000.99010.4315)DATA_SECURITY: Must be one of: C-IU, C-LD, C-RE, PublicOWNER: Must be at least 2 charactersRESOURCE_GROUP: Must be at least 3 charactersACR_SERVER: Must end with .azurecr.ioENVIRONMENT_ID: Must start with /subscriptions/ and contain managedEnvironmentsAUTH_CLIENT_ID: Must be UUID format if provided (optional)If validation fails, ask the user to correct the value.
Replace placeholders in these files:
App files (based on chosen language):
apps/{language}/package.json (Node.js) - Replace __APP_NAME__apps/{language}/pyproject.toml (Python) - Replace __APP_NAME__apps/{language}/pom.xml (Java) - Replace __APP_NAME__Terraform files:
env/dev/main.tf - Replace __APP_NAME__, __APP_TYPE__, __ACR_SERVER__, __AUTH_CLIENT_ID__env/dev/default.auto.tfvars - Replace all tag placeholders (__COST_CENTER__, __DATA_SECURITY__, __OWNER__, __RESOURCE_GROUP__, __ENVIRONMENT_ID__)Workflow files:
.github/workflows/container-app-ci.yml - Replace __APP_NAME__ and __APP_TYPE__.github/workflows/container-app-cd.yml - Replace __APP_NAME__ and __APP_TYPE__Use the Edit tool with replace_all: true for efficiency.
Ask the user if they want to remove the unused language directories:
Would you like to remove the unused app directories?
This will delete: apps/python, apps/java (keeping apps/node)
If yes, use Bash to remove the directories:
rm -rf apps/python apps/java
If the user skipped AUTH_CLIENT_ID, offer to remove the auth configuration:
You skipped authentication setup. Would you like to:
1. Keep auth config (configure later)
2. Remove auth config from Terraform
If they choose to remove, edit env/dev/main.tf to remove or comment out the auth_client_id and related lines.
Run terraform validation:
cd env/dev && terraform init -backend=false && terraform validate
Report any errors to the user.
Provide a summary:
Setup complete!
Configuration:
- App Name: {APP_NAME}
- Language: {LANGUAGE}
- Owner: {OWNER}
- Cost Center: {COST_CENTER}
- Data Security: {DATA_SECURITY}
- Resource Group: {RESOURCE_GROUP}
- ACR: {ACR_SERVER}
Files modified:
- apps/{language}/...
- env/dev/main.tf
- env/dev/default.auto.tfvars
- .github/workflows/container-app-ci.yml
- .github/workflows/container-app-cd.yml
Next steps:
1. Add your application code to apps/{language}/
2. Configure GitHub repository secrets:
- CLIENT_ID
- CLIENT_SECRET
- TENANT_ID
- SUBSCRIPTION_ID
- ACR_LOGIN_SERVER
- RESOURCE_GROUP_NAME
3. Commit and push your changes
4. Open a PR to trigger CI pipeline
| Placeholder | Replacement Variable |
|---|---|
__APP_NAME__ | APP_NAME |
__APP_TYPE__ | Language choice (node/python/java) |
__COST_CENTER__ | COST_CENTER |
__DATA_SECURITY__ | DATA_SECURITY |
__OWNER__ | OWNER |
__RESOURCE_GROUP__ | RESOURCE_GROUP |
__ENVIRONMENT_ID__ | ENVIRONMENT_ID |
__ACR_SERVER__ | ACR_SERVER |
__AUTH_CLIENT_ID__ | AUTH_CLIENT_ID (optional) |
Note:
subscription_id,tenant_id,client_id, andclient_secretare provided by GitHub Actions and do not need placeholders.
/setup-app again