import
agoraform import ADDRESS REMOTE-IDagoraform import -f path/to/agoraform.yaml ADDRESS REMOTE-IDPurpose
Section titled “Purpose”agoraform import brings an existing remote resource under Agoraform management without recreating it. It reads the live object, prints deterministic YAML for configurable fields, and persists the provider-native identity in local state.
Import never creates, updates, or deletes the remote resource. It does not rewrite your manifest.
The default manifest path is agoraform.yaml, used only to locate agoraform.state.json. The manifest file itself is not read.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
ADDRESS | Logical resource address (provider.type.name) |
REMOTE-ID | Provider-native identity of the existing object |
Exactly two arguments are required.
| Flag | Description |
|---|---|
-f, --file | Path to the Agoraform manifest used to locate local state (default agoraform.yaml) |
Expected behavior
Section titled “Expected behavior”- Resolve the provider and resource type from the logical address.
- Reject a logical address that already has a state binding.
- Read the existing remote resource.
- Translate configurable remote fields into Agoraform YAML.
- Persist the logical-address → provider-native identity mapping.
Computed and read-only fields are omitted. Provider-native identity is not emitted as a manifest attribute. Secrets never appear in the output.
After you add the generated configuration, agoraform plan against the unchanged remote resource should report no changes.
Matomo
Section titled “Matomo”agoraform import matomo.goal.trial_started 12agoraform import matomo.variable.user_id VARIABLE_IDagoraform import matomo.trigger.trial_started TRIGGER_IDagoraform import matomo.tag.trial_started TAG_IDImport Tag Manager dependencies before a tag so Agoraform can reconstruct logical $refs. If the fire trigger is not bound, or the remote tag uses an unsupported multi-trigger shape, import fails with guidance instead of emitting Matomo-native IDs as configuration.
Google Ads
Section titled “Google Ads”agoraform import googleads.conversion_action.trial_started 123456789agoraform import googleads.customer_conversion_goal.signup SIGNUP~WEBSITEConversion actions accept a numeric ID or customers/{customerId}/conversionActions/{id}. Customer conversion goals accept CATEGORY~ORIGIN or customers/{customerId}/customerConversionGoals/{category}~{origin}.
Unsupported conversion types or origins fail with guidance. Import does not emit a conversionAction $ref; add that optionally after import if the matching conversion action is also managed.
Exit codes
Section titled “Exit codes”| Code | Meaning |
|---|---|
0 | Import succeeded |
1 | Import failed |
3 | Invalid invocation (wrong number of arguments or unknown flag) |
Caveats
Section titled “Caveats”- Bulk discovery and interactive selection are out of scope.
- Related resources are not imported recursively.
- Existing manifests are not rewritten.