Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
terraform-aws-route53
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Terraform Modules
terraform-aws-route53
Commits
be85f8ab
Unverified
Commit
be85f8ab
authored
Nov 27, 2020
by
Leslie-Alexandre DENIS
Committed by
GitHub
Nov 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: use tomap() instead of type declaration object() (#14)
parent
fad80868
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
main.tf
examples/complete/main.tf
+6
-1
main.tf
modules/records/main.tf
+2
-3
No files found.
examples/complete/main.tf
View file @
be85f8ab
...
...
@@ -65,9 +65,14 @@ module "records" {
},
]
depends_on
=
[
module
.
zones
]
#, module.cloudfront, module.s3_bucket]
depends_on
=
[
module
.
zones
]
}
module
"disabled_records"
{
source
=
"../../modules/records"
create
=
false
}
#########
# Extras - should be created in advance
...
...
modules/records/main.tf
View file @
be85f8ab
...
...
@@ -12,8 +12,7 @@ data "aws_route53_zone" "this" {
}
resource
"aws_route53_record"
"this"
{
for_each
=
var
.
create
&&
(
var
.
zone_id
!
=
null
||
var
.
zone_name
!
=
null
)
?
local
.
recordsets
:
object
(
{}
)
# for_each = local.recordsets
for_each
=
var
.
create
&&
(
var
.
zone_id
!
=
null
||
var
.
zone_name
!
=
null
)
?
local
.
recordsets
:
tomap
(
{}
)
zone_id
=
data
.
aws_route53_zone
.
this
[
0
]
.
zone_id
...
...
@@ -26,7 +25,7 @@ resource "aws_route53_record" "this" {
for_each
=
length
(
keys
(
lookup
(
each
.
value
,
"alias"
,
{}
)))
==
0
?
[]
:
[
true
]
content
{
name
=
each
.
value
.
alias
.
name
# module.api_gateway.this_apigatewayv2_domain_name_configuration.0.target_domain_name
name
=
each
.
value
.
alias
.
name
zone_id
=
each
.
value
.
alias
.
zone_id
evaluate_target_health
=
lookup
(
each
.
value
.
alias
,
"evaluate_target_health"
,
false
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment