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

Does this work any more? #45

Open
stan-spotts opened this issue Aug 29, 2024 · 1 comment
Open

Does this work any more? #45

stan-spotts opened this issue Aug 29, 2024 · 1 comment

Comments

@stan-spotts
Copy link

stan-spotts commented Aug 29, 2024

I saw mention that this was deprecated and the API it used was deprecated. But nothing I could find on the DNSMadeEasy website or here support that.

Terraform Version

1.92

Affected Resource(s)

  • dme_dns_record

Terraform Configuration Files

# root main.tf

# skipped the parts that don't matter

module "app-gateway" {
  source = "../../modules/app-gateway"
  resource_group_name = var.resource_group_name
  vnet_name = var.vnet_name
  location = var.location
  identity_id = module.identity.identity_id
  appgw_service_name = var.appgw_service_name
  apim_service_name = var.apim_service_name
  apim_gateway_hostname = var.apim_gateway_hostname
  apim_portal_hostname = var.apim_portal_hostname
  apim_management_hostname = var.apim_management_hostname
  certificate_name = var.certificate_name
  certificate_secret_id = module.certificates.certificate_secret_id
  app_gateway_subnet_id = module.shared_research_vnet.subnet_ids["appgw_subnet"]
  appgw_domain_name_label = var.appgw_service_name
  tag = var.tags
  key_vault_id = var.key_vault_name
   
  depends_on = [ module.apim ]
}

# wait to give time to make sure app gateway is created
resource "time_sleep" "wait_for_app_gateway" {
  depends_on = [ module.app-gateway ]
  create_duration = "60s"  # Waits for 60 seconds
}

module "dnsmadeeasy" {
  source = "../../modules/dnsmadeeasy"

  apim_gateway_hostname = var.apim_gateway_hostname
  apim_portal_hostname = var.apim_portal_hostname
  apim_management_hostname = var.apim_management_hostname
  domain = var.domain
  app_gateway_public_ip = module.app-gateway.app_gateway_public_ip
}
# root providers.tf

terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "3.115.0"
    }
    azuread = {
      source  = "hashicorp/azuread"
      version = "~> 2.0"
    }
    tls = {
      source  = "hashicorp/tls"
      version = "~> 4.0"
    }
    dme = {
      source = "DNSMadeEasy/dme"
      version = "1.0.6"
    }
  }
}

provider "azurerm" {
  features {}
  subscription_id = "99999999-9999-9999-9999-99999999999999"
}

provider "azuread" {}

provider "dme" {
  api_key    = "00000000000000000000000000000000000"
  secret_key = "00000000000000000000000000000000000"
  insecure   = true
}
# module modules\dnsmadeeasy\main.tf
terraform {
  required_providers {
    dme = {
      source = "DNSMadeEasy/dme"
      version = "1.0.6"
    }
  }
}
resource "dme_dns_record" "apim_gateway" {
  domain_id  = var.domain
  name       = local.gateway_hostname_prefix
  type       = "A"
  value      = var.app_gateway_public_ip
  ttl        = 3600
}

resource "dme_dns_record" "apim_portal" {
  domain_id  = var.domain
  name       = local.portal_hostname_prefix
  type       = "CNAME"
  value      = local.gateway_hostname_prefix
  ttl        = 3600
}

resource "dme_dns_record" "apim_management" {
  domain_id  = var.domain
  name       = local.management_hostname_prefix
  type       = "CNAME"
  value      = local.gateway_hostname_prefix
  ttl        = 3600
}

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output:
https://gist.github.com/stan-spotts/96d2cc6268bfb5417aaaf789d1c08818

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

Should have created an 'A' record and two 'CNAME' records. The output showed the dns records would have had the correct information, it seemed.

Actual Behavior

│ Error: invalid character '<' looking for beginning of value

│ with module.dnsmadeeasy.dme_dns_record.apim_management,
│ on ....\modules\dnsmadeeasy\main.tf line 25, in resource "dme_dns_record" "apim_management":
│ 25: resource "dme_dns_record" "apim_management" {

Steps to Reproduce

  1. terraform apply

Important Factoids

Nothing out of the ordinary

References

No issues linked

@case-fastly
Copy link

I am seeing this error as well, fwiw.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants