Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from DNXLabs/dnx_update
Changing variables and adding examples after some tests with this module
- Loading branch information
Showing
6 changed files
with
63 additions
and
15 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
workspaces: | ||
prod-ap-southeast-2: | ||
route53_health_check: | ||
health_check_enable: true | ||
endpoints: | ||
- hostname: www.example.com | ||
port: 8443 | ||
protocol: HTTPS | ||
healthcheck_path: /healthcheck | ||
measure_latency: true | ||
- hostname: www.myportal.com | ||
port: 443 | ||
protocol: HTTPS | ||
healthcheck_path: | ||
measure_latency: true | ||
|
||
aws_cloudwatch_metric_alarm: [] | ||
# cloudwatch_alarms_enabled: true | ||
# - alarm_name: | ||
# period: | ||
# aws_sns_topic_arn: |
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,13 @@ | ||
module "terraform-aws-route53healthcheck" { | ||
source = "git::https://github.com/DNXLabs/terraform-aws-route53healthcheck.git?ref=0.1.1" | ||
for_each = { for healthcheck in try(local.workspace.route53_health_check.endpoint, []) : healthcheck.hostname => healthcheck } | ||
# providers = { | ||
# aws = aws.us-east-1 | ||
# } | ||
|
||
hostname = try(each.value.hostname, "[]") | ||
port = try(each.value.port, 443) | ||
protocol = try(each.value.protocol, "HTTPS") | ||
healthcheck_path = try(each.value.healthcheck_path, "") | ||
measure_latency = try(each.value.measure_latency, true) | ||
} |
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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
resource "aws_route53_health_check" "default" { | ||
reference_name = var.name | ||
fqdn = var.hostname | ||
port = var.port | ||
type = var.protocol | ||
resource_path = var.healthcheck_path | ||
failure_threshold = var.failure_threshold | ||
request_interval = var.time_request | ||
request_interval = var.request_interval | ||
measure_latency = var.measure_latency | ||
#insufficient_data_health_status = "Healthy" | ||
# reference_name = var.name | ||
|
||
tags = { | ||
Name = var.name | ||
Name = var.hostname | ||
} | ||
} | ||
} |