generated from cn-terraform/terraform-module-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
534 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
module "primary" { | ||
source = "../../" | ||
|
||
create_hosted_zone = false | ||
hosted_zone_id = "HOSTED_ZONE_ID" | ||
|
||
records = { | ||
"test.a" = { | ||
type = "A" | ||
ttl = 60 | ||
records = ["1.1.1.1"] | ||
} | ||
|
||
"test.aaaa" = { | ||
type = "AAAA" | ||
ttl = 60 | ||
records = ["2001:db8::1"] | ||
} | ||
|
||
"test.alias" = { | ||
type = "A" | ||
alias = { | ||
name = "dns_name" | ||
zone_id = "zone_id" | ||
evaluate_target_health = true | ||
} | ||
} | ||
|
||
"test.cname" = { | ||
type = "CNAME" | ||
ttl = 60 | ||
records = ["example.com"] | ||
} | ||
|
||
"test.mx" = { | ||
type = "MX" | ||
ttl = 60 | ||
records = ["10 mail.example.com"] | ||
} | ||
|
||
"test.ns" = { | ||
type = "NS" | ||
ttl = 60 | ||
records = ["ns-123.awsdns-45.net", "ns-678.awsdns-91.com"] | ||
} | ||
|
||
"test.soa" = { | ||
type = "SOA" | ||
ttl = 60 | ||
records = ["ns.example.com admin.example.com 123 900 600 86400 3600"] | ||
} | ||
|
||
"test.txt" = { | ||
type = "TXT" | ||
ttl = 60 | ||
records = ["This is a TXT record"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Required to test private zone | ||
resource "aws_vpc" "vpc" { | ||
cidr_block = "172.16.0.0/16" | ||
} | ||
|
||
module "private" { | ||
source = "../../" | ||
|
||
create_hosted_zone = true | ||
hosted_zone_name = "example.com" | ||
|
||
vpc = { | ||
vpc_id = aws_vpc.vpc.id | ||
} | ||
|
||
records = { | ||
"test.a" = { | ||
type = "A" | ||
ttl = 60 | ||
records = ["1.1.1.1"] | ||
} | ||
|
||
"test.aaaa" = { | ||
type = "AAAA" | ||
ttl = 60 | ||
records = ["2001:db8::1"] | ||
} | ||
|
||
"test.alias" = { | ||
type = "A" | ||
alias = { | ||
name = "dns_name" | ||
zone_id = "zone_id" | ||
evaluate_target_health = true | ||
} | ||
} | ||
|
||
"test.cname" = { | ||
type = "CNAME" | ||
ttl = 60 | ||
records = ["example.com"] | ||
} | ||
|
||
"test.mx" = { | ||
type = "MX" | ||
ttl = 60 | ||
records = ["10 mail.example.com"] | ||
} | ||
|
||
"test.ns" = { | ||
type = "NS" | ||
ttl = 60 | ||
records = ["ns-123.awsdns-45.net", "ns-678.awsdns-91.com"] | ||
} | ||
|
||
"test.soa" = { | ||
type = "SOA" | ||
ttl = 60 | ||
records = ["ns.example.com admin.example.com 123 900 600 86400 3600"] | ||
} | ||
|
||
"test.txt" = { | ||
type = "TXT" | ||
ttl = 60 | ||
records = ["This is a TXT record"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
terraform { | ||
required_version = ">= 0.13" | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 5" | ||
} | ||
} | ||
} | ||
|
||
provider "aws" { | ||
region = "us-east-1" | ||
skip_credentials_validation = true | ||
skip_requesting_account_id = true | ||
skip_metadata_api_check = true | ||
s3_use_path_style = true | ||
access_key = "mock_access_key" | ||
secret_key = "mock_secret_key" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.