Application Design Center Design Deploy
GoogleOfficialPublished by Google
- Skill
- Workflow
- Cloud and DevOps
- Apache-2.0
- Low risk
- Has scripts
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured process for managing the infrastructure lifecycle on Google Cloud Platform. It guides users through designing infrastructure with Terraform, validating configurations locally, performing best-practice plan scans, and deploying templates via the Application Design Center (ADC). The workflow emphasizes a local-first design approach, iterative remediation of security and configuration issues, and systematic deployment monitoring.
What it does
- Generates and validates Terraform configurations locally.
- Performs best-practice plan assessments against GCP standards.
- Imports validated Terraform modules into the Application Design Center registry.
- Deploys application templates to GCP environments.
- Monitors long-running deployment operations.
- Provides troubleshooting steps for deployment failures and resource conflicts.
When to use it
- When designing new GCP infrastructure using Terraform.
- When you need to validate HCL configurations against GCP best practices.
- When deploying infrastructure templates via the Application Design Center.
- When troubleshooting failed infrastructure deployments in GCP.
Advantages
- Ensures infrastructure is validated and compliant before deployment.
- Provides a clear, iterative path for resolving configuration and deployment errors.
- Integrates local Terraform development with centralized cloud registry management.
- Standardizes the deployment lifecycle for GCP resources.
Usage examples
- “Design a GCP VPC network with Terraform and deploy it to the Application Design Center.”
- The agent will generate the Terraform code, perform local validation, run a best-practice assessment, import the template to ADC, and trigger the deployment.
- “My infrastructure deployment failed in ADC, can you help me fix it?”
- The agent will analyze the deployment logs, identify the error, suggest a remediation for the local HCL, and guide you through the re-deployment process.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/google/application-design-center-design-deploy/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip application-design-center-design-deploy.zip -d .agents/skills
Documentation by Google
Designing and Deploying GCP Infrastructure with Application Design Center
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:application-design-center-design-deploy)"
and append agent-skills/1.0 (skill:application-design-center-design-deploy) to User-Agent headers.
Overview
This skill provides a prescriptive, production-grade workflow for the entire
infrastructure lifecycle on Google Cloud Platform (GCP). It replaces the
automated, opaque-box GAD design_infra tool with an agent-controlled design
and validation loop utilizing modular Terraform and local CLI validation,
followed by a shifted-left best practices plan scan prior to synchronization
with the Application Design Center (ADC) registry for deployment and lifecycle
management.
Always maintain the persona of a Principal Cloud Architect. Keep the local Terraform configuration as the source of truth, and ensure the design is fully compliant with best practices before importing it into the cloud registry.
Index
Pre-requisites: Setup & Confirmation
Phase 1: Local Infrastructure Design & Validation
Phase 2: Shifted-Left Best Practices Assessment & Iterative Remediation
Phase 3: Import IaC to Application Design Center
Phase 4: Application Deployment & Monitoring
Phase 5: Troubleshoot Deployment Failures
Phase 6: Verification & E2E Testing
Pre-requisites: Setup & Confirmation
Before executing Phase 1, you must perform the following setup steps:
Confirm Target Project & Location:
Explicitly ask the user to confirm the target GCP project ID and location (region).
If the user does not specify a location, use
us-central1as the default.Verify that your local environment has the active project set:
gcloud config set project <project_id>
Phase 1: Local Infrastructure Design & Validation
Goal: Transform user requirements and codebase characteristics into a 100% validated, secure, and compile-ready Terraform configuration locally.
Invoke the
designSkill: Call and execute thedesignskill (defined in design) for the user's prompt.The
designskill will autonomously perform the Codebase Analysis, query the catalog registry, planning, HCL generation, and local CLI validation loop (terraform init,validate,plan) in a dedicated scratch directory.
Locate Validated HCL: Identify the scratch directory where the
designskill saved the validated, compile-ready Terraform files (e.g.,scratch/tf_validate_<session_id>/).Verify Handover (MANDATORY): Ensure that the local validation loop in the
designskill completed successfully with a clean plan before proceeding. Meticulously inspect the HCL to verify:Secret-Safe Policy: Confirm that no plaintext credentials, passwords, or hardcoded secrets are written in
terraform.tfvarsor HCL resource blocks. All sensitive inputs must be wired through GCP Secret Manager.State Isolation Policy: Confirm that there is no remote backend block (e.g.,
backend "gcs" {}) in the HCL files. State must remain local in the scratch folder during validation, allowing ADC to handle the remote state registry upon import.Remediation: If any violations are found, correct them in the HCL, re-run local validation, and verify again. Do not proceed with unvalidated or insecure code.
Export Terraform Plan to JSON (MANDATORY): In the scratch directory, run the following commands to generate a binary plan and convert it into a clean JSON representation:
terraform plan -out=tfplan && terraform show -json tfplan > tfplan.jsonVerify that the
tfplan.jsonfile is successfully written in your scratch directory.
Phase 2: Shifted-Left Best Practices Assessment & Iterative Remediation
Goal: Validate the local plan's alignment with security, cost, and reliability benchmarks BEFORE importing it into the cloud registry, using the native ADC plan assessment API.
Discover Space ID (MANDATORY): Before running the assessment or creating templates, you must dynamically discover the active ADC Space ID in your target location:
List Spaces: Run the command:
gcloud design-center spaces list --project=<project_id> --location=<location>Select Space: Parse the output to identify the active space (e.g.,
test-deployorgooglespace). If multiple spaces exist, ask the user to confirm. If no space exists, ask the user or create one:gcloud design-center spaces create <space_id> --project=<project_id> --location=<location>
Execute Plan Assessment via gcloud: Run the plan-based assessment using the discovered Space ID and your exported
tfplan.jsonfile. Execute the command directly in your terminal:gcloud design-center spaces generate-terraform-assessment-report <space_id> \ --location=<location> \ --project=<project_id> \ --terraform-plan="<scratch_directory_path>/tfplan.json" \ --format=jsonAnalyze Findings: Present all findings to the user in a clean tabular format, detailing specific violations, resource scopes, and associated severity levels.
Local Remediation Loop:
Do not attempt to import or commit insecure code.
Edit your local HCL files in the scratch directory to fix the reported violations (e.g., adding encryption keys, enabling OS Login, or restricting IAM scopes).
Re-run Phase 1 local validation and plan export:
terraform validate && terraform plan -out=tfplan && terraform show -json tfplan > tfplan.jsonRe-run the plan assessment command shown in step 2.
Exit Criteria:
All high/critical findings resolved, or acceptable trade-offs documented.
Maximum of three (3) iterative attempts reached. Once clean or acceptable, proceed to Phase 3.
Phase 3: Import IaC to Application Design Center
Goal: Synchronize the fully validated and best-practice-compliant local HCL configuration with the ADC cloud registry to establish the deployable template resource.
Verify or Create the Application Template (MANDATORY): Before importing the HCL, you must ensure the parent Application Template resource exists in the discovered ADC space.
Check Existence: Run
gcloud design-center spaces application-templates describe <template_id> --space=<space_id> --project=<project_id> --location=<location>to check if the template exists.Create if Missing: If the describe command returns a
NOT_FOUNDerror, create the template resource first by running:gcloud design-center spaces application-templates create <template_id> --space=<space_id> --project=<project_id> --location=<location> --display-name="<Name>" --description="<Description>"
Strict HCL Parser Constraints (CRITICAL): Before calling the import operation, ensure your local HCL complies with the ADC registry's strict ingestion rules:
Pure Module Policy (No Resource Blocks): The ADC parser strictly prohibits any
resourceblocks inside the imported HCL. Onlymodule,variable,output, andproviderblocks are allowed. If a resource is required (e.g. Private Service Access peering) but no standalone module is registered for it in the catalog, you MUST check if it is supported as a built-in configuration option inside an existing registered module (e.g. settingprivate_service_access_configinsidemodule "vpc").Strict String Typing: The ADC parser does not perform implicit type coercion from boolean to string. For example, subnet private access must be declared as a literal string:
subnet_private_access = "true", NOT as a booleantrue.No Terraform Block: The parser strictly prohibits the
terraform {}version constraint block. Omit it entirely fromproviders.tformain.tf.
Import to ADC Template: Once the template resource is confirmed to exist and the HCL is validated against the above constraints, invoke the hosted
application_design_center:manage_application_templateMCP tool with theAPPLICATION_TEMPLATE_OPERATION_IMPORT_IACoperation:Arguments:
project: The target project ID.location: The GCP deployment region (e.g.,us-central1).spaceId: The discovered ADC space ID.applicationTemplateId: A unique name for your application template.operation:APPLICATION_TEMPLATE_OPERATION_IMPORT_IACiacModule: A structured object containing the files list:{ "files": [ { "name": "main.tf", "content": "<content of main.tf>" }, { "name": "variables.tf", "content": "<content of variables.tf>" }, { "name": "terraform.tfvars", "content": "<content of terraform.tfvars>" } ] }
Resilience & Retries (MANDATORY):
If the
IMPORT_IACcall fails due to a transient error (e.g.,502 Bad Gateway,504 Gateway Timeout, or429 Rate Limit), do not immediately retry.Use exponential backoff with jitter (e.g., waiting 2s, 4s, 8s plus a random fraction of a second).
Verify Revision before Retry: If a timeout occurred, first call
gcloud alpha design-center spaces application-templates describeto check if the import actually succeeded in the background. Only retry if the template was not updated.
Capture Template URI: Upon success, this establishes the template resource in your space. Construct the
applicationTemplateUriusing the pattern:projects/{project}/locations/{location}/spaces/{spaceId}/applicationTemplates/{applicationTemplateId}
Phase 4: Application Deployment & Monitoring
Goal: Deploy the validated, best-practice-compliant application template to the GCP environment.
Deploy Application: Invoke the hosted
application_design_center:manage_applicationMCP tool with theAPPLICATION_OPERATION_DEPLOYoperation:Arguments:
project: Target project ID.location: Target deployment location.spaceId: Target space ID.applicationId: A unique ID for the deployed application instance.applicationTemplateUri: The URI established in Phase 3.serviceAccount: The deployment service account.
Resilience & Retries (MANDATORY):
If the
DEPLOYoperation fails with transient network or gateway errors (e.g.,502,504), apply exponential backoff with jitter before retrying.If the deployment LRO times out or fails with a state conflict, verify the application status using
gcloud design-center spaces applications describeto confirm its status before retrying the deploy call, avoiding concurrent conflicting deployments.
Active LRO Monitoring:
The tool returns a Long-Running Operation (LRO). Inform the user that the deployment has started.
Do not sleep during deployment status polling. Poll the LRO actively every 30–60 seconds until
done: trueusing the commandgcloud design-center operations describe <operation_name>.
Handle Results:
Success: If
doneistrueand there is noerrorfield, proceed to Phase 6.Failure: If an
errorfield is present, analyze the error type and proceed to Phase 5.
Phase 5: Troubleshoot Deployment Failures
Goal: Diagnose and remediate deployment failures iteratively using the specialized troubleshooting skill and established cloud resolution patterns.
Iterative Cloud Resolution Patterns (CRITICAL): If the deployment fails with a
REVISION_FAILEDorTERRAFORMerror, check for these common resource conflicts:Service Account 409 Conflict (
alreadyExists): If the deployment fails because a service account generated by the module (e.g.frontend-service-us-central-sa) already exists in the project, remediate the local HCL by disabling service account creation and referencing the existing one:create_service_account = false service_account = "<existing_service_account_email>"Container Image 404 NotFound: If the deployment fails because a container image is not found, confirm that the image exists in your registry. For testing or hello-world deployments, leverage the official public Google hello-world image:
us-docker.pkg.dev/cloudrun/container/hello
Delegate to the Troubleshooting Skill: If a deployment failure occurs and does not match the above patterns, invoke and execute the specialized
infra-deployment-debuggingguide (located in infra-deployment-debugging).Select the Troubleshooting Context:
For Local Validation Errors (Phase 1/2): Follow Case B: Raw Terraform Deployment instructions in the troubleshooting skill to isolate syntax, compilation, and plan-time validation errors.
For Cloud Deployment Failures (Phase 4): Follow Case A: ADC Application Deployment instructions in the troubleshooting skill to analyze LRO errors, retrieve service logs, and diagnose cloud environment issues.
Apply Local-First Remediation:
Follow the troubleshooting skill's remediation guides to formulate a fix.
MANDATORY: Apply the fix directly to your local HCL files in the scratch directory, re-run local validation, re-import the HCL, and trigger a new deployment.
Re-run Phase 1 local validation and plan export:
terraform validate && terraform plan -out=tfplan && terraform show -json tfplan > tfplan.jsonRe-run the plan assessment (Phase 2) to ensure no new violations are introduced.
Re-import the corrected HCL to ADC using
APPLICATION_TEMPLATE_OPERATION_IMPORT_IAC.Trigger a new deployment using
APPLICATION_OPERATION_DEPLOY.
Iteration Threshold: Repeat the troubleshooting, validation, import, and redeployment cycle up to five (5) times. If it still fails, report the full history and diagnostics to the user.
Phase 6: Verification & E2E Testing
Goal: Confirm that the deployed services are healthy and fully functional.
Retrieve Deployed Resources: Invoke the hosted
application_design_center:manage_applicationMCP tool with theAPPLICATION_OPERATION_GEToperation to retrieve the resource details, public endpoints, and output parameters.Health Check: Verify that all services are using the correct container image URLs and that their runtime status is healthy.
E2E Validation: Conduct a simple demo test (e.g., checking public HTTP endpoints or triggering a dry-run transaction) to ensure E2E functionality. Present the results and public URLs to the user to conclude the task.
Reporting Issues
Report bugs or improvements for this skill at Google Skills Issues.
Files
- ATTRIBUTION.mdAdded by AutoGineer876 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md17.7 KiB
- references/adc_application_troubleshooting.md6.6 KiB
- references/attribution.md1.9 KiB
- references/design_guide.md14.3 KiB
- references/error_analysis_guide.md6.6 KiB
- references/generator_instructions.md8.4 KiB
- references/planner_instructions.md2.7 KiB
- references/raw_terraform_troubleshooting.md4.3 KiB
- references/remediation_guide.md4.3 KiB
- references/terraform_validator_instructions.md2.5 KiB
- references/troubleshooting_guide.md2.6 KiB
- scripts/fetch_terraform_template.pyScript9.8 KiB
- scripts/fetch_terraform_template_test.pyScript1.4 KiB
- scripts/list_terraform_templates.pyScript4.0 KiB
- scripts/list_terraform_templates_test.pyScript960 B
references/raw_terraform_troubleshooting.md
Raw Terraform Troubleshooting Process
Use this template when troubleshooting direct/raw Terraform deployment errors.
Troubleshooting Process
Follow these steps in sequence to analyze and resolve the Terraform deployment failure:
Step 1: Gather Input Terraform Code
Act: Identify all Terraform configuration files in the workspace (e.g.,
main.tf,variables.tf,outputs.tf,providers.tf).Verify: Read and understand their contents.
Step 2: Initialize Terraform
Act: Run the following command in the workspace directory containing the HCL files to initialize Terraform and download required modules and providers:
terraform initObserve:
If it fails, analyze the error message.
If it succeeds, proceed to Step 3.
Step 3: Run Validation
Act: Run the following command to check if the configuration is syntactically valid and internally consistent:
terraform validateObserve:
If it fails, capture the error message and proceed to Step 5 (Analyze and Fix).
If it succeeds, proceed to Step 4.
Step 4: Run Dry-Run Plan
Act: Run the following command to create a execution plan and verify against the cloud provider's schemas and constraints:
terraform planObserve:
If it fails, capture the error message and proceed to Step 5 (Analyze and Fix).
If it succeeds, and you have made modifications that resolved previous errors, proceed to Step 6 (Generate Output).
Step 5: Analyze and Fix
Analyze the Error:
If the error message references a file under
.terraform/modules/(e.g.,.terraform/modules/secret-manager-1/variables.tf), it means the error is due to a mismatch between your configuration and the module's expected inputs.Act: Read the referenced module file in
.terraform/modules/usingview_fileto inspect the variable definition, its type constraints, default values, and required attributes.If the error is a Terraform HCL syntax error (e.g., duplicate keys, invalid type), locate the line in your local files.
Apply the Fix:
Modify your local Terraform files (do NOT modify files inside
.terraform/modules/) to fix the error. For example:Add missing required attributes to variables or module inputs.
Change attribute types to match module schemas.
Remove duplicate block definitions or keys.
Format Files:
Run
terraform fmt <file_name>on every Terraform file you modified to ensure consistent formatting (spacing, alignment, etc.).
Re-Verify:
After applying the fix and formatting the files, run
terraform validate(Step 3).If validation passes, run
terraform plan(Step 4).Repeat this loop (Fix -> Format -> Validate -> Plan) until both commands succeed without errors.
Step 6: Generate Output
Construct the complete JSON response object containing the final, fixed Terraform files and a summary of the troubleshooting.
CRITICAL Constraint: NEVER run
terraform applyor any other mutating commands under any circumstances. Only useterraform init,terraform validate, andterraform planfor dry-run analysis.Format: The output must strictly follow the schema below.
{
"overall_status": {
"agent_failed": false,
"reason": ""
},
"troubleshooting_result": {
"summary": "Detailed summary explaining the root cause of the error and how the configuration was fixed.",
"terraform_files": [
{
"name": "main.tf",
"content": "..."
},
{
"name": "variables.tf",
"content": "..."
}
]
}
}If you are unable to resolve the error after multiple attempts (e.g. because of missing credentials or invalid schemas that cannot be fixed), generate a failure response:
{
"overall_status": {
"agent_failed": true,
"reason": "Explain why the agent failed to fix the error (e.g., 'terraform init failed with network error')."
},
"troubleshooting_result": {
"summary": "",
"terraform_files": []
}
}Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs a command-line tool, Needs Python
Security
What our scanner noticed· Low risk
- Scripts that your agent may run
This skill includes scripts that your agent may run. Read them before you use it.
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Publisher
- Google (Official)
- Source
- google/skills · skills/cloud/application-design-center-design-deploy · commit 2194d3b
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download application-design-center-design-deploy.zip