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 webhosting DNS records in attributes #2881

Open
incubateur-anct opened this issue Jan 24, 2025 · 0 comments
Open

Add support for webhosting DNS records in attributes #2881

incubateur-anct opened this issue Jan 24, 2025 · 0 comments

Comments

@incubateur-anct
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Currently, the webhosting resource created with terraform doesn't have the different domain records attributes. It would be nice to have them exposed as attributes in case we need to customize the DNS configuration instead of letting it handle the records automatically. I see that the records can already be queried by API using scw webhosting hosting get-dns-records domain=example.tld.

Having use scaleway_tem_domain before, it's surprising to not have the records available for scaleway_webhosting.

New or Affected Resource(s)

  • scaleway_webhosting

Potential Terraform Configuration

resource "scaleway_webhosting" "test" {
  # ...
}
locals {
  # listing records returned by scw webhosting hosting get-dns-records
  records = scaleway_webhosting.test.records
  # value format:
  # [
  #   {
  #     "name": "",
  #     "type": "a",
  #     "ttl": 14400,
  #     "value": <REDACTED>,
  #     "priority": 0,
  #     "status": "invalid"
  #   },
  #   ...
  # ]

  # listing name servers for autoconfig returned by scw webhosting hosting get-dns-records
  name_servers = scaleway_webhosting.test.name_servers
  # value format:
  # [
  #   {
  #     "hostname": "ns1.whm.fr-par.scw.cloud.",
  #     "status": "invalid",
  #     "is_default": true
  #   },
  #   ...
  # ]

  # even nicer: cleanly named attributes instead of a list
  records_nice = scaleway_webhosting.test.records
  # value format:
  # {
  #   "web": {
  #     "name": "",
  #     "type": "a",
  #     "ttl": 14400,
  #     "value": <REDACTED>,
  #     "priority": 0,
  #     "status": "invalid"
  #   },
  #   "web_www": {...},
  #   "ftp": {...},
  #   ...
  #
  #   "mail_webmail": {...},
  #   "mail_mx": {...},
  #   "mail_dkim": {...},
  #   "mail_spf": {...},
  #   ...
  #
  #   "cpannel_web": {...},
  #   "cpannel_cal": {...},
  #   "cpannel_calendars": {...},
  #   "cpannel_contacts": {...},
  #   ...
  # }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant