inwx / terraform-provider-inwx

INWX Terraform Provider plugin for Terraform
MIT License
19 stars 5 forks source link

Terraform Always Plans Changes for Unmodified INWX Record" #21

Closed sowinski closed 9 months ago

sowinski commented 10 months ago

Hi,

I don't undestand why terraform is always trying to make change. Even if I don't change anything.

This is my code.

terraform {
  required_providers {
    inwx = {
      source = "inwx/inwx"
      version = ">= 1.0.0"
    }
  }
}

provider "inwx" {
  api_url = "https://api.domrobot.com/jsonrpc/"
}

resource "inwx_nameserver_record" "a_records" {
  domain    = "example.com"
  name      = "www"
  type      = "A"
  content   = "12.12.12.12"
  ttl       = 3600
}

If I run apply and except the changes. It works, and I can see the new entry in the webinterface of INWX.

If I rerun the comand without any changes. Terraform is trying to change something again. I can rerun it 10 times and it will always detect changes.

Why? Is this a bug?

kimdre commented 10 months ago

Can you show the terraform output of these changes?

kimdre commented 10 months ago

Nevermind, your issue is that you have to specify the name as a fqdn. So name = "www" must be name = "www.example.com"

The INWX provider is not good designed in this matter.