Skip to content

validate

Terminal window
agoraform validate
agoraform validate -f path/to/manifest.yaml
agoraform validate path/to/manifest.yaml

Validate an Agoraform YAML manifest before plan or apply. The command loads the manifest, checks the v0.1 schema (apiVersion: agoraform.io/v1alpha1), resource addresses, duplicate logical names, resource references, and dependency cycles. When providers are registered, it also checks resource types, provider connection settings, and provider-specific required fields.

The default manifest path is agoraform.yaml.

ArgumentDescription
[file]Optional positional path to the manifest. At most one argument.

Specify a manifest as an argument or with --file, not both.

FlagDescription
-f, --filePath to the Agoraform manifest (default agoraform.yaml)

Cobra also provides -h / --help.

On success, validate prints a line such as:

Validated agoraform.yaml (2 resources).

It may contact providers to check connectivity. It does not mutate remote platforms.

Matomo runtime connection settings come from MATOMO_URL, MATOMO_TOKEN_AUTH, and MATOMO_SITE_ID; Tag Manager resource or publication work also requires MATOMO_CONTAINER_ID. Google Ads connection settings come from GOOGLE_ADS_DEVELOPER_TOKEN, GOOGLE_ADS_CLIENT_ID, GOOGLE_ADS_CLIENT_SECRET, GOOGLE_ADS_REFRESH_TOKEN, and GOOGLE_ADS_CUSTOMER_ID.

v0.3.0 loads .agoraform.env next to the selected manifest before initializing providers. Existing process environment variables win.

CodeMeaning
0Validation succeeded
1Runtime, validation, or provider failure
3Invalid CLI usage
  • Live validate requires reachable provider configuration for the resources you declare.
  • Unknown provider configuration fields are rejected.
  • Manifests that still contain Matomo idGoal in attributes are rejected; move identity into local state.