Add facets_default_providers/default/1.0 — legacy aws3tooling alias#336
Merged
unni-facets merged 4 commits intomainfrom Apr 27, 2026
Merged
Add facets_default_providers/default/1.0 — legacy aws3tooling alias#336unni-facets merged 4 commits intomainfrom
unni-facets merged 4 commits intomainfrom
Conversation
Declares the aws3tooling local provider name mapped to the spoofed hashicorp/aws3tooling source, so legacy capillary-cloud-tf envs can migrate to the new iac-generator flow without state surgery. State in those envs is bound to registry.terraform.io/hashicorp/aws3tooling (phantom path synthesized by the old Python generator); the companion Docker image change in iac-generator-releases places the real hashicorp/aws 3.74.0 binary under that path via terraform's implicit filesystem-mirror discovery. Blueprint resource name must be "default" — IsDefaultResource=true is what triggers un-aliased emission matching the legacy state shape. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Removes aws_region from spec.properties, var.instance.spec, and locals. The aws provider exposed by this module picks up region and credentials from the pod's standard AWS env vars (AWS_REGION, AWS_ACCESS_KEY_ID, etc.) via the provider's built-in env-var discovery. README expanded to document why spec is intentionally empty. Also removes "region: attributes.aws_region" from facets.yaml outputs.default.providers.aws3tooling.attributes; skip_region_validation stays (needed for tooling-VPC regions some envs use). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reusing @facets/aws_cloud_account was semantically wrong — this module is not a cloud account, it's a bundle of legacy provider aliases. Using aws_cloud_account would let consumers accidentally wire cloud-account inputs here and imply a data contract (aws_iam_role, aws_region, external_id, session_name) that doesn't apply. New type outputs/facets_default_providers/outputs.yaml has intentionally empty attributes/interfaces — consumers wire to it only for its aliased providers list (aws3tooling today; cloudflare/acme/mysql/ovh/facets-cloud follow-ups). facets.yaml + README updated accordingly. Module dry-run passes against this new type. Output type and module both uploaded to root profile (module published). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
clouds: [aws] only blocked the ovh (Kubernetes) project-type from accepting the resource at raptor apply time. This module isn't cloud- specific — it's a provider-alias shim consumed from any deployment context, so all four project-type clouds should accept it. Same pattern as cloud_account/aws_env_provider (clouds: [kubernetes]). Re-published to root with this change; resource added to standalone-agent blueprint (disabled) as a smoke test — apply succeeded. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
unni-facets
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
facets_default_providers/default/1.0, a foundational module that declares the legacyaws3toolinglocal provider name mapped to the spoofedhashicorp/aws3toolingsource. Paired with iac-generator-releases PR #4, it letscapillary-cloud-tfenvs migrate from the old Python IaC generator to the new iac-generator flow without any terraform state surgery.outputs.default.providers.aws3tooling—source: hashicorp/aws3tooling,version: "= 3.74.0",skip_region_validation: trueproperties: {},sample.spec: {}). Aws provider reads region + creds from the pod's standardAWS_*env vars; rationale captured in the README under "Configuration: intentionally empty spec — env-var driven".default—IsDefaultResource=trueis what makes the iac-generator emit an un-aliasedprovider "aws3tooling" {}block that matches the legacy un-aliased state binding.Both PRs must land together.
Why this shape
Traced through iac-generator's actual behavior before picking this shape:
provider[registry.terraform.io/hashicorp/aws3tooling]in existing state is a distinct source (nothashicorp/awswith alias). Synthesized by the old Python generator becauseprovider "aws3tooling" {}had no matchingrequired_providers.aws.aws3tooling) produces aliased state bindings likeprovider["hashicorp/aws"].alias. Would force per-resourceterraform state mvmigration on every legacy env. Rejected.aws3toolingas a separate local-name inoutputs.providerswith its own source — code path exists inv2/internal/providers/{extractor,processor}.go, no tests cover it, but it's what the legacy pattern needs.Consumer wiring
Any facets-modules-redesign module that references
aws3toolinginside its terraform (e.g., tooling-VPC data lookups) declares in itsfacets.yaml:processor.go:175-177skips explicitproviders = {}map entries for non-dotted providers wired to adefault-named source; terraform implicitly inherits the un-aliased provider from level2. Matches state.Validation
raptor create iac-module -f modules/facets_default_providers/default/1.0 --dry-runpasses (all validations + output types)terraform initagainst a minimal config withrequired_providers { aws3tooling = { source = "hashicorp/aws3tooling" version = "= 3.74.0" } }resolves the provider from the companion image's filesystem mirror (verified locally and on the pushed Docker Hub image — see iac-generator-releases PR Module-Testing-MCP-Instruction #4 test plan)h1:2t4ST6Mywf2agARErcQwYgWYOl7UqNalzqD03A1oGYg=Test plan
raptor … --dry-runterraform initsucceeds andterraform planshows only expected schema diffs (3.74 → whatever version the resources were created under)default, verify first release succeeds withoutcleanup_aws_tooling_v2.shrunningNew Module Checklist (per CLAUDE.md)
Still open, can be follow-ups:
icons/facets_default_providers.svgproject-type/{aws,gcp,azure}/project-type.ymlentriesindex.htmlcatalog entryREADME.mdcloud-section entryapp/internal/*)Open to landing this without the checklist items if the migration timeline is tight — module itself is fully validated and doesn't need the catalog UI to function.
Out of scope
aws3,aws4,aws5,aws593,aws6,helm3,helm-release-pod,cloudflare4,cloudflare4a,mysql). Can be added to this module'soutputs.providers+ the Dockerfile's spoofing loop in later PRs.🤖 Generated with Claude Code