en un clic
generate-provider
// Executes code generation from Magic Modules into downstream Terraform providers and optionally compiles the binary.
// Executes code generation from Magic Modules into downstream Terraform providers and optionally compiles the binary.
Plan a remediation strategy after a test failure.
Triggers the QA Test Runner subagent to reproduce failures and interpret logs.
Checks sync status and invokes the subagent to align repositories if needed.
Gather context on a change or bug and plan the implementation.
Checks if the downstream provider repository is aligned with the correct Magic Modules base commit.
Configures Terraform CLI with developer overrides to test locally built provider binaries without full Go acceptance tests, enabling rapid plan/apply cycles.
| name | generate-provider |
| description | Executes code generation from Magic Modules into downstream Terraform providers and optionally compiles the binary. |
generate-providerNote to AI Agents: You MUST read the YAML frontmatter above first. Only read the rest of this file if the
descriptionmatches your current roadblock or required task.
magic-modules root directory.$GOPATH environment variable must be set correctly.Set your variables and run the commands in sequence.
# 1. Define Variables
VERSION="beta" # or "ga"
PROVIDER_PATH="$GOPATH/src/github.com/hashicorp/terraform-provider-google-beta" # or "terraform-provider-google" for GA
# Verify we are in /Users/camthornton/magic-modules
pwd
# Verify no uncommitted changes exist in the downstream provider directory.
# Stop if there are uncommitted changes and alert the user.
cd "$PROVIDER_PATH"
git status --porcelain
# 2. Code Generation (Run from Magic Modules root)
cd /Users/camthornton/magic-modules
make provider VERSION=$VERSION OUTPUT_PATH="$PROVIDER_PATH"
# 3. Verify Changes (Run from Downstream Provider root)
cd "$PROVIDER_PATH"
# Verify that git status precisely matches the scope of your local Magic Modules edits.
# If you see "surprise" diffs in unrelated resources, ask the user if you should run `sync-provider` first.
git status --porcelain
# 4. Compile Binary (Already in Downstream Provider root)
make build