Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of idempotency #549

Open
itaispiegel opened this issue Oct 11, 2023 · 0 comments
Open

Lack of idempotency #549

itaispiegel opened this issue Oct 11, 2023 · 0 comments

Comments

@itaispiegel
Copy link

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

  1. Create a tenant manually on the website. Say its name is "tenant".
  2. Define the following resource:
resource "octopusdeploy_tenant" "tenant" {
  name        = "tenant"
}
  1. 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
@zentron zentron closed this as completed Apr 23, 2024
@zentron zentron reopened this Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants