Describe the bug
Hello! I see, that provider doesn't work with state. It doesn't see the resource and tries to create resources again, after creating it.
To Reproduce
Steps to reproduce the behavior:terraform apply
with creating new resource. For example, new organisation,
then try terraform apply
again or terraform destroy
to delete resources.
Expected behavior
Working state. It's possible to manage and modify resources, not only create them.
Log Output
% terraform applydata.vault_generic_secret.gitea: Reading...data.vault_generic_secret.gitea: Read complete after 0s [id=emb_devops/services/gitea]Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + createTerraform will perform the following actions: # gitea_org.test321 will be created + resource "gitea_org" "test321" { + avatar_url = (known after apply) + id = (known after apply) + name = "test321" + repo_admin_change_team_access = true + repos = (known after apply) + visibility = "public" }Plan: 1 to add, 0 to change, 0 to destroy.Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yesgitea_org.test321: Creating...gitea_org.test321: Creation complete after 0s [id=1932]Apply complete! Resources: 1 added, 0 changed, 0 destroyed.% terraform applydata.vault_generic_secret.gitea: Reading...data.vault_generic_secret.gitea: Read complete after 0s [id=emb_devops/services/gitea]gitea_org.test321: Refreshing state... [id=1932]Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + createTerraform will perform the following actions: # gitea_org.test123 will be created + resource "gitea_org" "test123" { + avatar_url = (known after apply) + id = (known after apply) + name = "test123" + repo_admin_change_team_access = true + repos = (known after apply) + visibility = "public" }Plan: 1 to add, 0 to change, 0 to destroy.Do you want to perform these actions? Terraform will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yesgitea_org.test123: Creating...╷│ Error: user already exists [name: test123]││ with gitea_org.test123,│ on gitea_organizations.tf line 3, in resource "gitea_org" "test123":│ 3: resource "gitea_org" "test123" {
Additional Data
Gitea version: 1.21.1
Terraform Version: v1.5.7
Operating System: macOS 14.4.1
Provider Version: v0.3.0