terraform-provider-octopusdeploy
terraform-provider-octopusdeploy copied to clipboard
Lack of idempotency
trafficstars
Describe the bug The provider isn't idempotent. When trying to use the provider to apply a configuration of resources which already exist, an error is raised saying that the resource already exists.
Steps to reproduce
- Create a tenant manually on the website. Say its name is "tenant".
- Define the following resource:
resource "octopusdeploy_tenant" "tenant" {
name = "tenant"
}
- Apply the configuration, and expect to receive the following output:
|
│ Error: octopus deploy api returned an error on endpoint /api/Spaces-1/tenants - [A tenant with this name already exists. Please choose a different name.]
│
│ with octopusdeploy_tenant.tenant,
│ on main.tf line 17, in resource "octopusdeploy_tenant" "tenant":
│ 17: resource "octopusdeploy_tenant" "tenant" {
│
╵
Expected behavior The expected behavior is that Terraform should return without making any changes.
Environment and versions:
- OS: OSX
- Octopus Server Version: 2023.4.4798
- Terraform Version: v1.5.2
- Octopus Terraform Provider Version: v0.12.7