Before you start please confirm the following.
Problem Description
After the updates in #114 the way the Edge Config ID which is determined by the provider has improved a lot, but there is still an issue where if an existing config with the same name exists in Portainer the provider will select with config's ID instead and so perform update/delete operations on that.
This will seem to remain a limitation of the provider until Portainer returns the ID on a POST request, but it is probably worth documenting to explain the limitation and to warn users against creating configs with the same name.
An "good-enough" alternative would be to look at the created field in the GET /edge_configurations response and assume that the config with the same name which has most recently been created is probably the one just created by the provider.
Expected Behavior
Provider ignores existing edge configurations when creating a new resource with the same name.
Actual Behavior
Provider assigns wrong ID and manages existing edge configuration with same name.
Steps to Reproduce
- Manually create edge configuration with name
Test in Portainer
- Create
portainer_edge_configurations resource with name = "Test" in Terraform and apply
- Delete Terraform-managed edge configuration
- Notice that manually created edge configuration has now been deleted
Logs / Screenshots / Terraform Output
N/A
Affected Resource(s)
portainer_edge_configurations
Terraform Command Used
terraform apply
Relevant Terraform Configuration
Provider Version
1.28.0
Terraform Version
1.14.8
Portainer Version
2.39.1
Platform and Version
No response
OS and Architecture
MacOS ARM64
Additional Information
No response
Before you start please confirm the following.
Problem Description
After the updates in #114 the way the Edge Config ID which is determined by the provider has improved a lot, but there is still an issue where if an existing config with the same name exists in Portainer the provider will select with config's ID instead and so perform update/delete operations on that.
This will seem to remain a limitation of the provider until Portainer returns the
IDon aPOSTrequest, but it is probably worth documenting to explain the limitation and to warn users against creating configs with the same name.An "good-enough" alternative would be to look at the
createdfield in theGET/edge_configurationsresponse and assume that the config with the same name which has most recently been created is probably the one just created by the provider.Expected Behavior
Provider ignores existing edge configurations when creating a new resource with the same name.
Actual Behavior
Provider assigns wrong ID and manages existing edge configuration with same name.
Steps to Reproduce
Testin Portainerportainer_edge_configurationsresource withname = "Test"in Terraform and applyLogs / Screenshots / Terraform Output
N/A
Affected Resource(s)
portainer_edge_configurations
Terraform Command Used
terraform apply
Relevant Terraform Configuration
Provider Version
1.28.0
Terraform Version
1.14.8
Portainer Version
2.39.1
Platform and Version
No response
OS and Architecture
MacOS ARM64
Additional Information
No response