feat(dns): migrate functions from gandi to dnsimple #113

Merged
janik merged 1 commit from janik/dnsimple into main 2024-09-24 18:37:58 +00:00
Owner

nix run .#tf plan

...

OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

OpenTofu will perform the following actions:

  # dnsimple_zone_record.flowery_systems_CNAME_ will be created
  + resource "dnsimple_zone_record" "flowery_systems_CNAME_" {
      + id               = (known after apply)
      + name_normalized  = (known after apply)
      + priority         = (known after apply)
      + qualified_name   = (known after apply)
      + ttl              = 300
      + type             = "CNAME"
      + value            = "news.forkos.org"
      + value_normalized = (known after apply)
      + zone_id          = (known after apply)
      + zone_name        = "flowery.systems"
    }

Plan: 1 to add, 0 to change, 0 to destroy.
`nix run .#tf plan` ```plain ... OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create OpenTofu will perform the following actions: # dnsimple_zone_record.flowery_systems_CNAME_ will be created + resource "dnsimple_zone_record" "flowery_systems_CNAME_" { + id = (known after apply) + name_normalized = (known after apply) + priority = (known after apply) + qualified_name = (known after apply) + ttl = 300 + type = "CNAME" + value = "news.forkos.org" + value_normalized = (known after apply) + zone_id = (known after apply) + zone_name = "flowery.systems" } Plan: 1 to add, 0 to change, 0 to destroy. ```
janik added 1 commit 2024-09-23 22:28:51 +00:00
janik requested review from amaxine 2024-09-23 22:29:17 +00:00
amaxine approved these changes 2024-09-24 18:35:57 +00:00
amaxine left a comment
Member

Looks good

Looks good
janik merged commit d780f18534 into main 2024-09-24 18:37:58 +00:00
Author
Owner
OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

OpenTofu will perform the following actions:

  # dnsimple_zone_record.flowery_systems_CNAME_ will be created
  + resource "dnsimple_zone_record" "flowery_systems_CNAME_" {
      + id               = (known after apply)
      + name_normalized  = (known after apply)
      + priority         = (known after apply)
      + qualified_name   = (known after apply)
      + ttl              = 300
      + type             = "CNAME"
      + value            = "news.forkos.org"
      + value_normalized = (known after apply)
      + zone_id          = (known after apply)
      + zone_name        = "flowery.systems"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
  OpenTofu will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

dnsimple_zone_record.flowery_systems_CNAME_: Creating...
╷
│ Error: API returned a Validation Error for: name
│
│   with dnsimple_zone_record.flowery_systems_CNAME_,
│   on config.tf.json line 40, in resource.dnsimple_zone_record.flowery_systems_CNAME_[0]:
│   40:           "name": "",
│
│ can't be blank. Consider using an ALIAS instead.
╵
╷
│ Error: API returned an error
│
│   with dnsimple_zone_record.flowery_systems_CNAME_,
│   on config.tf.json line 45, in resource.dnsimple_zone_record.flowery_systems_CNAME_[0]:
│   45:         }
│
│ Validation failed
╵
╷
│ Error: API returned a Validation Error for: base
│
│   with dnsimple_zone_record.flowery_systems_CNAME_,
│   on config.tf.json line 45, in resource.dnsimple_zone_record.flowery_systems_CNAME_[0]:
│   45:         }
│
│ NS record (id=58753487) already exists on flowery.systems. CNAME and NS records cannot both exist on the same name., NS record (id=58753488) already exists on flowery.systems. CNAME and NS records
│ cannot both exist on the same name., NS record (id=58753489) already exists on flowery.systems. CNAME and NS records cannot both exist on the same name., NS record (id=58753490) already exists on
│ flowery.systems. CNAME and NS records cannot both exist on the same name., SOA record (id=58753486) already exists on flowery.systems. CNAME and SOA records cannot both exist on the same name.

rip 💀

``` OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: + create OpenTofu will perform the following actions: # dnsimple_zone_record.flowery_systems_CNAME_ will be created + resource "dnsimple_zone_record" "flowery_systems_CNAME_" { + id = (known after apply) + name_normalized = (known after apply) + priority = (known after apply) + qualified_name = (known after apply) + ttl = 300 + type = "CNAME" + value = "news.forkos.org" + value_normalized = (known after apply) + zone_id = (known after apply) + zone_name = "flowery.systems" } Plan: 1 to add, 0 to change, 0 to destroy. Do you want to perform these actions? OpenTofu will perform the actions described above. Only 'yes' will be accepted to approve. Enter a value: yes dnsimple_zone_record.flowery_systems_CNAME_: Creating... ╷ │ Error: API returned a Validation Error for: name │ │ with dnsimple_zone_record.flowery_systems_CNAME_, │ on config.tf.json line 40, in resource.dnsimple_zone_record.flowery_systems_CNAME_[0]: │ 40: "name": "", │ │ can't be blank. Consider using an ALIAS instead. ╵ ╷ │ Error: API returned an error │ │ with dnsimple_zone_record.flowery_systems_CNAME_, │ on config.tf.json line 45, in resource.dnsimple_zone_record.flowery_systems_CNAME_[0]: │ 45: } │ │ Validation failed ╵ ╷ │ Error: API returned a Validation Error for: base │ │ with dnsimple_zone_record.flowery_systems_CNAME_, │ on config.tf.json line 45, in resource.dnsimple_zone_record.flowery_systems_CNAME_[0]: │ 45: } │ │ NS record (id=58753487) already exists on flowery.systems. CNAME and NS records cannot both exist on the same name., NS record (id=58753488) already exists on flowery.systems. CNAME and NS records │ cannot both exist on the same name., NS record (id=58753489) already exists on flowery.systems. CNAME and NS records cannot both exist on the same name., NS record (id=58753490) already exists on │ flowery.systems. CNAME and NS records cannot both exist on the same name., SOA record (id=58753486) already exists on flowery.systems. CNAME and SOA records cannot both exist on the same name. ``` rip 💀
Author
Owner

I'm uncertain why it fails with the empty name, the code matches the example: https://registry.terraform.io/providers/dnsimple/dnsimple/latest/docs/resources/zone_record#example-usage

I'm uncertain why it fails with the empty name, the code matches the example: https://registry.terraform.io/providers/dnsimple/dnsimple/latest/docs/resources/zone_record#example-usage
Member

Doh, I feel stupid for not catching that you're creating a root CNAME. Those are not allowed.

Doh, I feel stupid for not catching that you're creating a root CNAME. Those are not allowed.
janik deleted branch janik/dnsimple 2024-09-24 18:53:21 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: the-distro/infra#113
No description provided.