hashicorp / terraform-provider-dyn

Terraform Dyn provider. Please note: This Terraform provider is archived per our provider archiving process: https://terraform.io/docs/internals/archiving.html
https://registry.terraform.io
Mozilla Public License 2.0
7 stars 16 forks source link

dyn_record: no MX record support #4

Closed hashibot closed 6 years ago

hashibot commented 7 years ago

This issue was originally opened by @mdkent as hashicorp/terraform#9028. It was migrated here as part of the provider split. The original body of the issue is below.


This is more of a feature request after realizing that MX records aren't supported.

Terraform Version

Terraform v0.7.3

Affected Resource(s)

resource "dyn_record" "mail-test" {
  zone  = "${var.zone_name}"
  name  = "mail-test"
  value = "10 ${module.mail-in.elb_dns_name}"
  type  = "MX"
  ttl   = 30
}

Expected Behavior

Terraform creates a MX record on mail-test.test.com.

Actual Behavior

Plan:

+ dyn_record.mail-test
    fqdn:  "<computed>"
    name:  "mail-test"
    ttl:   "30"
    type:  "MX"
    value: "10 test-production-mail-in-elb-123.us-east-1.elb.amazonaws.com"
    zone:  "test.com"

which is incorrect, the record exists in dyn.

Apply:

Error applying plan:

1 error(s) occurred:

* dyn_record.mail-test: Failed to create Dyn record: Failed to create Dyn RData: Invalid Dyn record type: MX

For the time being a mention of this missing functionality on https://www.terraform.io/docs/providers/dyn/r/record.html would be an improvement.

Similar to https://github.com/hashicorp/terraform/issues/6252

phamann commented 7 years ago

The go-dynect client now supports MX records as of v0.5.0. See this PR and their changelog for further details.