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 autonomys.net DNS records to terraform #327

Merged
merged 2 commits into from
Sep 9, 2024
Merged

Conversation

DaMandal0rian
Copy link
Member

@DaMandal0rian DaMandal0rian commented Jul 18, 2024

PR Type

Enhancement


Description

  • Added a new Cloudflare zone data block for autonomys.net in dns/data.tf.
  • Added a new output for autonomys.net zone ID in dns/outputs.tf.
  • Added multiple DNS records for autonomys.net including A records, CNAME records, and MX records in a new file dns/autonomys.net.

Changes walkthrough 📝

Relevant files
Enhancement
data.tf
Add autonomys.net zone data block                                               

dns/data.tf

  • Added autonomys.net zone data block.
+5/-0     
outputs.tf
Add output for autonomys.net zone ID                                         

dns/outputs.tf

  • Added output for autonomys.net zone ID.
+5/-0     
autonomys.net
Add DNS records for autonomys.net                                               

dns/autonomys.net

  • Added DNS records for autonomys.net including A, CNAME, and MX
    records.
  • +91/-0   

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No key issues to review

    Copy link

    github-actions bot commented Jul 18, 2024

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Use "@" for the MX record name to correctly target the root domain

    Ensure consistency in the name attribute for MX records. The name should be set to
    "@" to correctly signify the root domain rather than repeating the domain name.

    dns/autonomys.net [38-46]

     resource "cloudflare_record" "mailserver_mx_1" {
    -  name     = "autonomys.net"
    +  name     = "@"
       comment  = "MX record pointing to our preferred mailserver"
       priority = 1
       proxied  = false
       ttl      = 3600
       type     = "MX"
       value    = "aspmx.l.google.com"
       zone_id  = data.cloudflare_zone.autonomys_net.id
     }
     
    Suggestion importance[1-10]: 9

    Why: Using "@" for the MX record name is a best practice that ensures the record correctly targets the root domain. This change enhances clarity and correctness in the DNS configuration.

    9
    Enhancement
    Enable Cloudflare proxy for CNAME records to enhance security and performance

    Consider setting the proxied attribute to true for the CNAME records to take
    advantage of Cloudflare's security and performance features unless there is a
    specific need to bypass Cloudflare's proxy.

    dns/autonomys.net [19-34]

     resource "cloudflare_record" "autonomys_net_www" {
       name    = "www"
    -  proxied = false
    +  proxied = true
       ttl     = 3600
       type    = "CNAME"
       value   = "sites.framer.app"
       zone_id = data.cloudflare_zone.autonomys_net.id
     }
     resource "cloudflare_record" "autonomys_net_academy" {
       name    = "academy"
    -  proxied = false
    +  proxied = true
       ttl     = 3600
       type    = "CNAME"
       value   = "a80ab473c4-hosting.gitbook.io"
       zone_id = data.cloudflare_zone.autonomys_net.id
     }
     
    Suggestion importance[1-10]: 7

    Why: The suggestion to enable Cloudflare's proxy for CNAME records can improve security and performance, but it may not be necessary if there is a specific reason to bypass the proxy. The suggestion is contextually accurate and improves the existing code.

    7

    @DaMandal0rian DaMandal0rian requested a review from vedhavyas July 18, 2024 20:26
    @DaMandal0rian DaMandal0rian merged commit fb1ebc2 into main Sep 9, 2024
    1 check passed
    @DaMandal0rian DaMandal0rian deleted the autonomys-dns branch September 9, 2024 11:54
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants