Hey @kislerdm, I loved the Terraform provider. So far the only limitation I found is that I cannot use autoscaling_limit_max_cu as a float (e.g.: 0.25).
Also, I have been experiencing instabilities during branch creation while deploying from GitHub Actions, but I’m not sure if it is related to the provider, Terraform, or to Neon APIs.
Sometimes, while I am creating a new branch, it says the branch already exists although it did not exist before the terraform apply.
module.staging.module.researchers-peers-svc.google_project_iam_binding.secret_accessor: Creation complete after 9s [id=***/roles/secretmanager.secretAccessor]
╷
│ Error: [HTTP Code: 409][Error Code: ] branch with the provided name "staging" already exists
│
│ with module.staging.module.postgresql-dbms-environment.neon_branch.postgresql-dbms-environment,
│ on postgresql-dbms-environment/main.tf line 1, in resource "neon_branch" "postgresql-dbms-environment":
│ 1: resource "neon_branch" "postgresql-dbms-environment" ***
│
╵
╷
│ Error: [HTTP Code: 409][Error Code: ] branch with the provided name "production" already exists
│
│ with module.production.module.postgresql-dbms-environment.neon_branch.postgresql-dbms-environment,
│ on postgresql-dbms-environment/main.tf line 1, in resource "neon_branch" "postgresql-dbms-environment":
│ 1: resource "neon_branch" "postgresql-dbms-environment" ***
What I noticed is that when that error occurs, the branch ends up being created but it is not assigned to a compute endpoint.
That is really unpredictable so I’m trying out other database providers that also offer a terraform provider. It is sad since Neon is so much more intuitive than GCP and your terraform provider was really easy to configure.
[Update]
I tried to update hashicorp/setup-terraform@v1 to hashicorp/setup-terraform@v2 in my GitHub actions, and it resulted in success for one branch and failure for another.
I have also tried installing Terraform with:
- name: Install Terraform
run: |
sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint
… but got the same instability. Sometimes works locally, sometimes not, sometime one branch is created and another is not created.
@kislerdm, did you experience something similar? Any ideas about what could be causing that?