existing-entity-requirements
Installation
SKILL.md
Entity Requirements Documentation
Produce an OpenSpec spec (spec.md) for an existing Terraform resource or data source by examining its code path and capturing behavior. Follow dev-docs/high-level/openspec-requirements.md and the OpenSpec shape: ## Purpose, optional ## Schema, ## Requirements with ### Requirement: and #### Scenario: blocks; use SHALL / MUST in requirement text.
Input
- Entity: User specifies the Terraform entity (e.g.
elasticstack_elasticsearch_security_role) or the implementation path (e.g.internal/elasticsearch/security/role). - Resolve the implementation package:
- For Plugin Framework based entities, search for
req.ProviderTypeName + "_...". - For SDK based entities, this is defined in
internal/provider/provider.go.
Workflow
- Locate implementation
- Resource: Package under
internal/containingresource.ResourceandSchema,Create,Read,Update,Delete(and optionallyImportState,UpgradeState). - Data source: Package or file (e.g.
*_data_source.go) containing a data sourceSchemaandRead.
- Resource: Package under