원클릭으로
tgc-add-new-generated-resource-skill
Add a new generated resource to TGC. Use when you need to add a new generated resource to TGC.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Add a new generated resource to TGC. Use when you need to add a new generated resource to TGC.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Skill for reviewing Magic Modules schemas. Currently covers the Enum vs. String decision via the knowledge base.
Opt resource into MMv1 list-resource generation by setting `generate_list_resource: true`, validate it locally, and open a one-resource PR against GoogleCloudPlatform/magic-modules. Invoke when the user asks to add list-resource support for a specific MMv1 resource or to enable `generate_list_resource` for an eligible resource.
Fallback workflow for general implementation and debugging tasks that do not involve creating a new resource.
Workflow specifically for creating a new resource, supporting both autogen and manual generation.
Create a Pull Request (PR) against GoogleCloudPlatform/magic-modules following repository standards, including branch management, commit formatting, mandatory release notes, pre-PR verification checks, and gh CLI commands.
Validate that changes to the generated providers don't introduce breaking changes or fields with missing tests or missing documentation. Use this skill when the user wants to check for breaking changes, missing tests, or missing documentation, or other problems in the downstream providers.
| name | tgc-add-new-generated-resource-skill |
| description | Add a new generated resource to TGC. Use when you need to add a new generated resource to TGC. |
When you need to add a new generated resource to TGC, use this skill.
If you added or modified a generated resource, follow the steps below carefully.
mmv1/products/.../Resource.yaml for each google_ type.
name: 'resource_name' or perform a filename match.include_in_tgc_next: true is present at the top-level.mmv1/api/resource.go file.url_param_only: true and required: true, verify if they can be extracted from the CAI asset name during cai2hcl conversion.self_link in the YAML file is just {{name}} or does not contain all the required parameters in its pattern, you MUST specify cai_asset_name_format at the top-level to define the pattern for extraction.cai_asset_name_format: 'projects/{{project}}/locations/{{location}}/notificationConfigs/{{config_id}}'custom_flatten.d.Get(...) instead of reading from the passed value v (common in shared templates), it will return empty values during cai2hcl conversion because there is no Terraform state.tgc_ignore_terraform_custom_flatten: true to the field's definition in the YAML to use the default mapping.third_party are shared with the standard Google Provider. DO NOT use exclude_test: true in examples or rename handwritten tests to skip them for TGC, as this will affect the Google Provider as well!tgc_skip_test: 'Reason for skipping' to the example definition in the resource's YAML file.tgc_tests section at the top-level of the resource's YAML file with skip: 'Reason for skipping'. This prevents the generator from creating duplicates and applies the skip.cai2hcl drops), it may fail validation (Invalid combination of arguments).tgc_decoder in mmv1/templates/tgc_next/decoders/ to inject minimal valid data or an empty map to satisfy the schema when data is missing in CAI.go mod tidy or compilation fails after generation because a package (e.g., compute) is not found in the TGC environment.mmv1/templates/terraform/constants may contain hardcoded imports or functions relying on packages not available in TGC.IsTgcCompiler:
{{- if not $.ResourceMetadata.ProductMetadata.IsTgcCompiler }}
// Code to exclude for TGC (only included for standard Terraform provider)
{{- end }}
Note: The exact path to IsTgcCompiler may vary depending on the template's context (e.g., $.IsTgcCompiler or $.ProductMetadata.IsTgcCompiler).Error generating resource tests: No TGC tests for resource <ResourceName>