Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for all DNSimple record types and configurable default records, including SRV #12

Merged
merged 3 commits into from
Oct 4, 2023

Conversation

DXTimer
Copy link
Contributor

@DXTimer DXTimer commented Aug 10, 2023

This PR entirely overhauls the module's capability. It now supports:

  • All DNS record types supported by DNSimple
  • It allows for multiple records to be created as part of a single service definition by using index notation in the service.meta keys e.g. meta.dnsimple_<attribute>[<index>] or meta.dnsimple_zone_name[1]. This is due to a limitation of the meta section only supporting string values.
  • Variable expansion in the record name and content attributes so that developers can use any of the values defined in the service spec without hardcoding.

Belongs to https://github.com/dnsimple/dnsimple-marketing/issues/619
Belongs to https://github.com/dnsimple/dnsimple-external-integrations/issues/4

@github-actions
Copy link

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖failure

Terraform Validation 🤖success

Show Plan

terraform

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

Terraform planned the following actions, but then encountered a problem:

  # dnsimple_zone_record.consul_service_records["api"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "api"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "A"
      + value          = "172.17.0.1"
      + zone_id        = (known after apply)
      + zone_name      = "amazon.works"
    }

  # dnsimple_zone_record.consul_service_records["web_1"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 600
      + type           = "A"
      + value          = "172.17.0.3"
      + zone_id        = (known after apply)
      + zone_name      = "amazon.works"
    }

  # dnsimple_zone_record.consul_service_records["web_2"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "A"
      + value          = "172.17.0.3"
      + zone_id        = (known after apply)
      + zone_name      = "amazon.works"
    }

  # dnsimple_zone_record.consul_service_records["web_3"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "A"
      + value          = "172.17.0.3"
      + zone_id        = (known after apply)
      + zone_name      = "amazon.works"
    }

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

Pusher: @DXTimer, Action: pull_request

* Support all record types
* Suport multiple records per service
* Support variable expansion in the record_name and record_content attributes
* Simplify configuration by using a nested module
@github-actions
Copy link

github-actions bot commented Oct 3, 2023

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Terraform Validation 🤖success

Show Plan

terraform
module.service_records["api"].data.util_replace.record_contents["$nameA$addressvegan.pizza"]: Reading...
module.service_records["api"].data.util_replace.record_contents["$nameA$addressvegan.pizza"]: Read complete after 0s [id=2499395263]
module.service_records["web_1"].data.util_replace.record_names["web.devA127.0.0.1vegan.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_names["mailMX10 $addressmeatlover.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_contents["$name.internal-secondaryA$addressmeatlover.pizza"]: Reading...
module.service_records["web_1"].data.util_replace.record_names["web.devA127.0.0.1vegan.pizza"]: Read complete after 0s [id=2713156357]
module.service_records["web_3"].data.util_replace.record_contents["$name.internal-secondaryA$addressmeatlover.pizza"]: Read complete after 0s [id=2063064979]
module.service_records["web_3"].data.util_replace.record_names["mailMX10 $addressmeatlover.pizza"]: Read complete after 0s [id=1361488968]
module.service_records["web_3"].data.util_replace.record_names["$name.internal-secondaryA$addressmeatlover.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_names["$name.internalA$node_addressmeatlover.pizza"]: Reading...
module.service_records["web_2"].data.util_replace.record_contents["$nameSRV10 10 $port $addressvegan.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_contents["mailMX10 $addressmeatlover.pizza"]: Reading...
module.service_records["api"].data.util_replace.record_contents["$name.internalA$node_addressvegan.pizza"]: Reading...
module.service_records["web_2"].data.util_replace.record_names["$nameSRV10 10 $port $addressvegan.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_contents["$name.internalA$node_addressmeatlover.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_contents["$nameSRV10 10 $port $node_addressvegan.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_contents["$nameSRV10 10 $port $node_addressvegan.pizza"]: Read complete after 0s [id=2385133577]
module.service_records["web_1"].data.util_replace.record_contents["web.devA127.0.0.1vegan.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_names["$nameSRV10 10 $port $node_addressvegan.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_names["$name.internal-secondaryA$addressmeatlover.pizza"]: Read complete after 0s [id=2581359468]
module.service_records["web_3"].data.util_replace.record_contents["$name.internalA$node_addressmeatlover.pizza"]: Read complete after 0s [id=1752284142]
module.service_records["web_2"].data.util_replace.record_names["$nameSRV10 10 $port $addressvegan.pizza"]: Read complete after 0s [id=365508689]
module.service_records["web_3"].data.util_replace.record_names["$name.internalA$node_addressmeatlover.pizza"]: Read complete after 0s [id=4218739576]
module.service_records["web_2"].data.util_replace.record_contents["$nameSRV10 10 $port $addressvegan.pizza"]: Read complete after 0s [id=879871711]
module.service_records["web_3"].data.util_replace.record_contents["mailMX10 $addressmeatlover.pizza"]: Read complete after 0s [id=3730013214]
module.service_records["api"].data.util_replace.record_contents["$name.internalA$node_addressvegan.pizza"]: Read complete after 0s [id=527862648]
module.service_records["api"].data.util_replace.record_names["$nameA$addressvegan.pizza"]: Reading...
module.service_records["api"].data.util_replace.record_names["$name.internalA$node_addressvegan.pizza"]: Reading...
module.service_records["web_1"].data.util_replace.record_contents["web.devA127.0.0.1vegan.pizza"]: Read complete after 0s [id=3619153832]
module.service_records["web_3"].data.util_replace.record_names["$nameSRV10 10 $port $node_addressvegan.pizza"]: Read complete after 0s [id=365508689]
module.service_records["api"].data.util_replace.record_names["$name.internalA$node_addressvegan.pizza"]: Read complete after 0s [id=1058013210]
module.service_records["api"].data.util_replace.record_names["$nameA$addressvegan.pizza"]: Read complete after 0s [id=2902841359]

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

Terraform will perform the following actions:

  # module.service_records["api"].dnsimple_zone_record.consul_service_records["$name.internalA$node_addressvegan.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "api.internal"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 1800
      + type           = "A"
      + value          = "192.168.10.10"
      + zone_id        = (known after apply)
      + zone_name      = "vegan.pizza"
    }

  # module.service_records["api"].dnsimple_zone_record.consul_service_records["$nameA$addressvegan.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "api"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 1800
      + type           = "A"
      + value          = "172.17.0.1"
      + zone_id        = (known after apply)
      + zone_name      = "vegan.pizza"
    }

  # module.service_records["web_1"].dnsimple_zone_record.consul_service_records["web.devA127.0.0.1vegan.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web.dev"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 60
      + type           = "A"
      + value          = "127.0.0.1"
      + zone_id        = (known after apply)
      + zone_name      = "vegan.pizza"
    }

  # module.service_records["web_2"].dnsimple_zone_record.consul_service_records["$nameSRV10 10 $port $addressvegan.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "SRV"
      + value          = "10 10 5000 172.17.0.3"
      + zone_id        = (known after apply)
      + zone_name      = "vegan.pizza"
    }

  # module.service_records["web_3"].dnsimple_zone_record.consul_service_records["$name.internal-secondaryA$addressmeatlover.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web.internal-secondary"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "A"
      + value          = "172.17.0.3"
      + zone_id        = (known after apply)
      + zone_name      = "meatlover.pizza"
    }

  # module.service_records["web_3"].dnsimple_zone_record.consul_service_records["$name.internalA$node_addressmeatlover.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web.internal"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "A"
      + value          = "192.168.10.11"
      + zone_id        = (known after apply)
      + zone_name      = "meatlover.pizza"
    }

  # module.service_records["web_3"].dnsimple_zone_record.consul_service_records["$nameSRV10 10 $port $node_addressvegan.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "SRV"
      + value          = "10 10 5000 192.168.10.11"
      + zone_id        = (known after apply)
      + zone_name      = "vegan.pizza"
    }

  # module.service_records["web_3"].dnsimple_zone_record.consul_service_records["mailMX10 $addressmeatlover.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "mail"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "MX"
      + value          = "10 172.17.0.3"
      + zone_id        = (known after apply)
      + zone_name      = "meatlover.pizza"
    }

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

Changes to Outputs:
  + service_records = {
      + api   = {
          + defaults           = {
              + record_ttl  = 1800
              + record_type = "A"
              + zone_name   = "vegan.pizza"
            }
          + recs               = {
              + "$name.internalA$node_addressvegan.pizza" = {
                  + record_content = "$node_address"
                  + record_name    = "$name.internal"
                  + record_ttl     = 1800
                  + record_type    = "A"
                  + zone_name      = "vegan.pizza"
                }
              + "$nameA$addressvegan.pizza"               = {
                  + record_content = "$address"
                  + record_name    = "$name"
                  + record_ttl     = 1800
                  + record_type    = "A"
                  + zone_name      = "vegan.pizza"
                }
            }
          + service_record_map = [
              + "vegan.pizza:api.internal:A:1800:192.168.10.10",
              + "vegan.pizza:api:A:1800:172.17.0.1",
            ]
        }
      + web_1 = {
          + defaults           = {
              + record_ttl  = 3600
              + record_type = "A"
              + zone_name   = null
            }
          + recs               = {
              + "web.devA127.0.0.1vegan.pizza" = {
                  + record_content = "127.0.0.1"
                  + record_name    = "web.dev"
                  + record_ttl     = 60
                  + record_type    = "A"
                  + zone_name      = "vegan.pizza"
                }
            }
          + service_record_map = [
              + "vegan.pizza:web.dev:A:60:127.0.0.1",
            ]
        }
      + web_2 = {
          + defaults           = {
              + record_ttl  = 3600
              + record_type = "A"
              + zone_name   = null
            }
          + recs               = {
              + "$nameSRV10 10 $port $addressvegan.pizza" = {
                  + record_content = "10 10 $port $address"
                  + record_name    = "$name"
                  + record_ttl     = 3600
                  + record_type    = "SRV"
                  + zone_name      = "vegan.pizza"
                }
            }
          + service_record_map = [
              + "vegan.pizza:web:SRV:3600:10 10 5000 172.17.0.3",
            ]
        }
      + web_3 = {
          + defaults           = {
              + record_ttl  = 3600
              + record_type = "A"
              + zone_name   = "meatlover.pizza"
            }
          + recs               = {
              + "$name.internal-secondaryA$addressmeatlover.pizza" = {
                  + record_content = "$address"
                  + record_name    = "$name.internal-secondary"
                  + record_ttl     = 3600
                  + record_type    = "A"
                  + zone_name      = "meatlover.pizza"
                }
              + "$name.internalA$node_addressmeatlover.pizza"      = {
                  + record_content = "$node_address"
                  + record_name    = "$name.internal"
                  + record_ttl     = 3600
                  + record_type    = "A"
                  + zone_name      = "meatlover.pizza"
                }
              + "$nameSRV10 10 $port $node_addressvegan.pizza"     = {
                  + record_content = "10 10 $port $node_address"
                  + record_name    = "$name"
                  + record_ttl     = 3600
                  + record_type    = "SRV"
                  + zone_name      = "vegan.pizza"
                }
              + "mailMX10 $addressmeatlover.pizza"                 = {
                  + record_content = "10 $address"
                  + record_name    = "mail"
                  + record_ttl     = 3600
                  + record_type    = "MX"
                  + zone_name      = "meatlover.pizza"
                }
            }
          + service_record_map = [
              + "meatlover.pizza:web.internal-secondary:A:3600:172.17.0.3",
              + "meatlover.pizza:web.internal:A:3600:192.168.10.11",
              + "vegan.pizza:web:SRV:3600:10 10 5000 192.168.10.11",
              + "meatlover.pizza:mail:MX:3600:10 172.17.0.3",
            ]
        }
    }

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Pusher: @DXTimer, Action: pull_request

@DXTimer DXTimer self-assigned this Oct 3, 2023
@DXTimer DXTimer requested a review from AGS4NO October 3, 2023 16:12
@github-actions
Copy link

github-actions bot commented Oct 3, 2023

Terraform Format and Style 🖌success

Terraform Initialization ⚙️success

Terraform Plan 📖success

Terraform Validation 🤖success

Show Plan

terraform
module.service_records["web_1"].data.util_replace.record_names["web.devA127.0.0.1vegan.pizza"]: Reading...
module.service_records["api"].data.util_replace.record_names["$nameA$addressvegan.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_names["$nameSRV10 10 $port $node_addressvegan.pizza"]: Reading...
module.service_records["web_1"].data.util_replace.record_names["web.devA127.0.0.1vegan.pizza"]: Read complete after 0s [id=2713156357]
module.service_records["web_3"].data.util_replace.record_names["mailMX10 $addressmeatlover.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_names["$name.internalA$node_addressmeatlover.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_names["$name.internal-secondaryA$addressmeatlover.pizza"]: Reading...
module.service_records["api"].data.util_replace.record_names["$name.internalA$node_addressvegan.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_contents["$name.internalA$node_addressmeatlover.pizza"]: Reading...
module.service_records["web_2"].data.util_replace.record_names["$nameSRV10 10 $port $addressvegan.pizza"]: Reading...
module.service_records["api"].data.util_replace.record_names["$name.internalA$node_addressvegan.pizza"]: Read complete after 0s [id=1058013210]
module.service_records["web_2"].data.util_replace.record_names["$nameSRV10 10 $port $addressvegan.pizza"]: Read complete after 0s [id=365508689]
module.service_records["api"].data.util_replace.record_names["$nameA$addressvegan.pizza"]: Read complete after 0s [id=2902841359]
module.service_records["web_3"].data.util_replace.record_names["$nameSRV10 10 $port $node_addressvegan.pizza"]: Read complete after 0s [id=365508689]
module.service_records["api"].data.util_replace.record_contents["$nameA$addressvegan.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_contents["$name.internalA$node_addressmeatlover.pizza"]: Read complete after 0s [id=1752284142]
module.service_records["api"].data.util_replace.record_contents["$name.internalA$node_addressvegan.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_names["mailMX10 $addressmeatlover.pizza"]: Read complete after 0s [id=1361488968]
module.service_records["web_3"].data.util_replace.record_names["$name.internalA$node_addressmeatlover.pizza"]: Read complete after 0s [id=4218739576]
module.service_records["web_3"].data.util_replace.record_names["$name.internal-secondaryA$addressmeatlover.pizza"]: Read complete after 0s [id=2581359468]
module.service_records["api"].data.util_replace.record_contents["$name.internalA$node_addressvegan.pizza"]: Read complete after 0s [id=527862648]
module.service_records["web_3"].data.util_replace.record_contents["$nameSRV10 10 $port $node_addressvegan.pizza"]: Reading...
module.service_records["web_1"].data.util_replace.record_contents["web.devA127.0.0.1vegan.pizza"]: Reading...
module.service_records["web_2"].data.util_replace.record_contents["$nameSRV10 10 $port $addressvegan.pizza"]: Reading...
module.service_records["api"].data.util_replace.record_contents["$nameA$addressvegan.pizza"]: Read complete after 0s [id=2499395263]
module.service_records["web_3"].data.util_replace.record_contents["mailMX10 $addressmeatlover.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_contents["$name.internal-secondaryA$addressmeatlover.pizza"]: Reading...
module.service_records["web_3"].data.util_replace.record_contents["$name.internal-secondaryA$addressmeatlover.pizza"]: Read complete after 0s [id=2063064979]
module.service_records["web_3"].data.util_replace.record_contents["$nameSRV10 10 $port $node_addressvegan.pizza"]: Read complete after 0s [id=2385133577]
module.service_records["web_2"].data.util_replace.record_contents["$nameSRV10 10 $port $addressvegan.pizza"]: Read complete after 0s [id=879871711]
module.service_records["web_1"].data.util_replace.record_contents["web.devA127.0.0.1vegan.pizza"]: Read complete after 0s [id=3619153832]
module.service_records["web_3"].data.util_replace.record_contents["mailMX10 $addressmeatlover.pizza"]: Read complete after 0s [id=3730013214]

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

Terraform will perform the following actions:

  # module.service_records["api"].dnsimple_zone_record.consul_service_records["$name.internalA$node_addressvegan.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "api.internal"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 1800
      + type           = "A"
      + value          = "192.168.10.10"
      + zone_id        = (known after apply)
      + zone_name      = "vegan.pizza"
    }

  # module.service_records["api"].dnsimple_zone_record.consul_service_records["$nameA$addressvegan.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "api"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 1800
      + type           = "A"
      + value          = "172.17.0.1"
      + zone_id        = (known after apply)
      + zone_name      = "vegan.pizza"
    }

  # module.service_records["web_1"].dnsimple_zone_record.consul_service_records["web.devA127.0.0.1vegan.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web.dev"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 60
      + type           = "A"
      + value          = "127.0.0.1"
      + zone_id        = (known after apply)
      + zone_name      = "vegan.pizza"
    }

  # module.service_records["web_2"].dnsimple_zone_record.consul_service_records["$nameSRV10 10 $port $addressvegan.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "SRV"
      + value          = "10 10 5000 172.17.0.3"
      + zone_id        = (known after apply)
      + zone_name      = "vegan.pizza"
    }

  # module.service_records["web_3"].dnsimple_zone_record.consul_service_records["$name.internal-secondaryA$addressmeatlover.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web.internal-secondary"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "A"
      + value          = "172.17.0.3"
      + zone_id        = (known after apply)
      + zone_name      = "meatlover.pizza"
    }

  # module.service_records["web_3"].dnsimple_zone_record.consul_service_records["$name.internalA$node_addressmeatlover.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web.internal"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "A"
      + value          = "192.168.10.11"
      + zone_id        = (known after apply)
      + zone_name      = "meatlover.pizza"
    }

  # module.service_records["web_3"].dnsimple_zone_record.consul_service_records["$nameSRV10 10 $port $node_addressvegan.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "web"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "SRV"
      + value          = "10 10 5000 192.168.10.11"
      + zone_id        = (known after apply)
      + zone_name      = "vegan.pizza"
    }

  # module.service_records["web_3"].dnsimple_zone_record.consul_service_records["mailMX10 $addressmeatlover.pizza"] will be created
  + resource "dnsimple_zone_record" "consul_service_records" {
      + id             = (known after apply)
      + name           = "mail"
      + priority       = (known after apply)
      + qualified_name = (known after apply)
      + ttl            = 3600
      + type           = "MX"
      + value          = "10 172.17.0.3"
      + zone_id        = (known after apply)
      + zone_name      = "meatlover.pizza"
    }

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

Changes to Outputs:
  + service_records = {
      + api   = {
          + defaults           = {
              + record_ttl  = 1800
              + record_type = "A"
              + zone_name   = "vegan.pizza"
            }
          + service_record_map = [
              + "vegan.pizza:api.internal:A:1800:192.168.10.10",
              + "vegan.pizza:api:A:1800:172.17.0.1",
            ]
        }
      + web_1 = {
          + defaults           = {
              + record_ttl  = 3600
              + record_type = "A"
              + zone_name   = null
            }
          + service_record_map = [
              + "vegan.pizza:web.dev:A:60:127.0.0.1",
            ]
        }
      + web_2 = {
          + defaults           = {
              + record_ttl  = 3600
              + record_type = "A"
              + zone_name   = null
            }
          + service_record_map = [
              + "vegan.pizza:web:SRV:3600:10 10 5000 172.17.0.3",
            ]
        }
      + web_3 = {
          + defaults           = {
              + record_ttl  = 3600
              + record_type = "A"
              + zone_name   = "meatlover.pizza"
            }
          + service_record_map = [
              + "meatlover.pizza:web.internal-secondary:A:3600:172.17.0.3",
              + "meatlover.pizza:web.internal:A:3600:192.168.10.11",
              + "vegan.pizza:web:SRV:3600:10 10 5000 192.168.10.11",
              + "meatlover.pizza:mail:MX:3600:10 172.17.0.3",
            ]
        }
    }

─────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't
guarantee to take exactly these actions if you run "terraform apply" now.

Pusher: @DXTimer, Action: pull_request

@DXTimer DXTimer marked this pull request as ready for review October 3, 2023 16:17
@DXTimer DXTimer requested a review from a team October 3, 2023 16:17
@DXTimer DXTimer merged commit 0d28bdd into main Oct 4, 2023
1 check passed
@DXTimer DXTimer deleted the feature/allow-all-record-types branch October 4, 2023 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants