kislerdm / terraform-provider-neon

Terraform provider to manage Neon SaaS resources
https://registry.terraform.io/providers/kislerdm/neon/latest/docs
Mozilla Public License 2.0
35 stars 13 forks source link

Fix import of existing branch #25

Closed kislerdm closed 1 year ago

kislerdm commented 1 year ago

Terraform Version

v1.3.3

Provider Version

v0.1.0

Affected Resource(s)

Debug Output

neon_branch.this: Modifying... [id=br-steep-silence-472824]
2023-02-16T13:51:11.506+0100 [ERROR] provider.terraform-provider-neon_v0.1.0: Response contains error diagnostic: tf_provider_addr=registry.terraform.io/kislerdm/neon tf_req_id=f80b37ba-c02f-2c3d-4197-662ccc663a36 diagnostic_severity=ERROR diagnostic_summary="[HTTP Code: 400][Error Code: ] cannot set branch to the same name" tf_proto_version=5.3 diagnostic_detail= tf_resource_type=neon_branch tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-go@v0.14.1/tfprotov5/internal/diag/diagnostics.go:55 @module=sdk.proto timestamp=2023-02-16T13:51:11.506+0100
│ Error: [HTTP Code: 400][Error Code: ] cannot set branch to the same name
│ 
│   with neon_branch.this,
│   on db.tf line 5, in resource "neon_branch" "this":
│    5: resource "neon_branch" "this" {
│ 

Expected Behavior

Existing branch import works.

Steps to Reproduce

  1. terraform import neon_branch.this "{{.branchID}}, where branchID is the ID of an existing Neon branch
  2. terraform plan && terraform apply
asterikx commented 1 year ago

I'm experiencing this issue too :/