Skip to content

Commit

Permalink
unify all DNS record resources
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonsnir committed May 13, 2024
1 parent 6a7a794 commit 97bc6d4
Show file tree
Hide file tree
Showing 13 changed files with 173 additions and 333 deletions.
34 changes: 0 additions & 34 deletions docs/resources/dns_aaaa_record.md

This file was deleted.

34 changes: 0 additions & 34 deletions docs/resources/dns_alias_record.md

This file was deleted.

34 changes: 0 additions & 34 deletions docs/resources/dns_caa_record.md

This file was deleted.

34 changes: 0 additions & 34 deletions docs/resources/dns_cname_record.md

This file was deleted.

34 changes: 0 additions & 34 deletions docs/resources/dns_mx_record.md

This file was deleted.

34 changes: 0 additions & 34 deletions docs/resources/dns_ns_record.md

This file was deleted.

11 changes: 6 additions & 5 deletions docs/resources/dns_a_record.md → docs/resources/dns_record.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "netlify_dns_a_record Resource - netlify"
page_title: "netlify_dns_record Resource - netlify"
subcategory: ""
description: |-
---

# netlify_dns_a_record (Resource)
# netlify_dns_record (Resource)



Expand All @@ -18,17 +18,18 @@ description: |-
### Required

- `hostname` (String)
- `type` (String)
- `value` (String)
- `zone_id` (String)

### Optional

- `flag` (Number)
- `priority` (Number)
- `tag` (String)
- `ttl` (Number)

### Read-Only

- `flag` (Number)
- `id` (String) The ID of this resource.
- `last_updated` (String)
- `priority` (Number)
- `tag` (String)
34 changes: 0 additions & 34 deletions docs/resources/dns_spf_record.md

This file was deleted.

34 changes: 0 additions & 34 deletions docs/resources/dns_txt_record.md

This file was deleted.

20 changes: 12 additions & 8 deletions examples/dns/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,30 @@ resource "netlify_dns_zone" "example" {
}
}

resource "netlify_dns_a_record" "cat" {
resource "netlify_dns_record" "cat" {
type = "A"
zone_id = netlify_dns_zone.example.id
hostname = "cat.example-tf-test-test.com"
value = "10.0.0.15"
}

resource "netlify_dns_cname_record" "dog" {
resource "netlify_dns_record" "dog" {
type = "CNAME"
zone_id = netlify_dns_zone.example.id
hostname = "dog.example-tf-test-test.com"
value = "cat.example-tf-test-test.com"
ttl = 60
}

resource "netlify_dns_txt_record" "bird" {
resource "netlify_dns_record" "bird" {
type = "TXT"
zone_id = netlify_dns_zone.example.id
hostname = "bird.example-tf-test-test.com"
value = "hello world"
}

resource "netlify_dns_mx_record" "fish" {
resource "netlify_dns_record" "fish" {
type = "MX"
zone_id = netlify_dns_zone.example.id
hostname = "fish.example-tf-test-test.com"
value = "mail.example-tf-test-test.com"
Expand All @@ -51,10 +55,10 @@ resource "netlify_dns_mx_record" "fish" {
data "netlify_dns_zone" "example" {
name = "example-tf-test-test.com"
depends_on = [
netlify_dns_a_record.cat,
netlify_dns_cname_record.dog,
netlify_dns_txt_record.bird,
netlify_dns_mx_record.fish,
netlify_dns_record.cat,
netlify_dns_record.dog,
netlify_dns_record.bird,
netlify_dns_record.fish,
]
}

Expand Down
Loading

0 comments on commit 97bc6d4

Please sign in to comment.