Target: 0.2.0. Not for the 0.1.0 release, which documents import as unsupported.
Problem
No resource implements ImportState. Combined with the deployment lifecycle boundary, emqxcloud_deployment becomes a one-way door:
create deployment -> provider refuses delete -> terraform state rm to release
-> Terraform can never manage that deployment again
After terraform state rm, a deployment remains readable through the emqxcloud_deployment data source but cannot be managed by any resource. Live deployment identifiers and cleanup ownership are intentionally tracked outside this public issue.
The provider can read a deployment by ID but cannot adopt one. Any lost state file or mistaken state rm therefore requires manual recovery.
Suggested scope
- Add
ImportState to emqxcloud_deployment, keyed by deployment_id, and populate immutable attributes through the Platform API read path.
- Define handling for
deployment_name and a missing deployment_version.
- Consider import for Deployment API resources whose identities are already well defined (
type:name, rule_id, user_id, as/who).
- Update
README.md, docs/index.md, and templates/*.tmpl, which currently state that import is unsupported.
This changes externally visible behavior, so it requires a confirmed development document first, per AGENTS.md.
Target: 0.2.0. Not for the 0.1.0 release, which documents import as unsupported.
Problem
No resource implements
ImportState. Combined with the deployment lifecycle boundary,emqxcloud_deploymentbecomes a one-way door:After
terraform state rm, a deployment remains readable through theemqxcloud_deploymentdata source but cannot be managed by any resource. Live deployment identifiers and cleanup ownership are intentionally tracked outside this public issue.The provider can read a deployment by ID but cannot adopt one. Any lost state file or mistaken
state rmtherefore requires manual recovery.Suggested scope
ImportStatetoemqxcloud_deployment, keyed bydeployment_id, and populate immutable attributes through the Platform API read path.deployment_nameand a missingdeployment_version.type:name,rule_id,user_id,as/who).README.md,docs/index.md, andtemplates/*.tmpl, which currently state that import is unsupported.This changes externally visible behavior, so it requires a confirmed development document first, per
AGENTS.md.