Documentation
¶
Overview ¶
Package parse determines what resources and datasources a Terraform provider exposes, and writes the result to {provider}-members.json in the current working directory. The rest of pike consumes that JSON at runtime to validate mapping coverage.
There are two extraction strategies. The schema-based path (default) runs `terraform providers schema -json` against a throwaway init'd workspace and reads the provider's declared resource and datasource schemas directly. It is fast, authoritative, and requires terraform (or a tofu binary symlinked as terraform) plus network access to the provider registry.
The docs-based path walks a local checkout of the provider's source repository and greps the markdown documentation for resource and datasource declarations. It's slower, inferred rather than authoritative, and kept as a fallback for offline/airgapped use or for providers that don't publish a registry schema.
Parse tries the schema path first. If that fails AND a codebase directory was supplied, it falls back to the docs path. If the schema path fails and no codebase was supplied, the schema error is returned verbatim.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EmbeddedMembers ¶
EmbeddedMembers returns the raw members JSON for a provider by its short name (aws, azurerm/azure, google/gcp). Unknown names return nil; empty byte slices indicate an embedded-but-empty file, which in practice only happens if the members JSON was deleted before build.
Types ¶
This section is empty.