route53 add
This commit is contained in:
20
modules/route53-record/main.tf
Normal file
20
modules/route53-record/main.tf
Normal file
@ -0,0 +1,20 @@
|
||||
resource "aws_route53_record" "default" {
|
||||
count = var.type_alias ? 0 : 1
|
||||
zone_id = var.zone_id
|
||||
name = var.prefix
|
||||
type = var.type
|
||||
ttl = var.ttl
|
||||
records = var.record_list
|
||||
}
|
||||
|
||||
resource "aws_route53_record" "alias" {
|
||||
count = var.type_alias ? 1 : 0
|
||||
zone_id = var.zone_id
|
||||
name = var.name
|
||||
|
||||
type = var.type
|
||||
|
||||
ttl = var.ttl
|
||||
|
||||
records = var.record_list
|
||||
}
|
0
modules/route53-record/outputs.tf
Normal file
0
modules/route53-record/outputs.tf
Normal file
20
modules/route53-record/variables.tf
Normal file
20
modules/route53-record/variables.tf
Normal file
@ -0,0 +1,20 @@
|
||||
variable "zone_id" {
|
||||
description = "set host-zone id"
|
||||
type = string
|
||||
}
|
||||
variable "prefix" {
|
||||
description = "set host-zone id"
|
||||
type = string
|
||||
}
|
||||
variable "type" {
|
||||
description = "set host-zone id"
|
||||
type = string
|
||||
}
|
||||
variable "ttl" {
|
||||
description = "set host-zone id"
|
||||
type = string
|
||||
}
|
||||
variable "record_list" {
|
||||
description = "set host-zone id"
|
||||
type = list(string)
|
||||
}
|
Reference in New Issue
Block a user