Skip to content

Commit

Permalink
Merge pull request #59 from Ontotext-AD/fix-monitoring-issues
Browse files Browse the repository at this point in the history
Fixed variable name for FQDN
  • Loading branch information
simeonzhekofff authored Jul 11, 2024
2 parents 9ad1ad2 + 6809b57 commit 8ce4468
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Before you begin using this Terraform module, ensure you meet the following prer
| lb\_deregistration\_delay | Amount time, in seconds, for GraphDB LB target group to wait before changing the state of a deregistering target from draining to unused. | `string` | `300` | no |
| lb\_health\_check\_path | The endpoint to check for GraphDB's health status. | `string` | `"/rest/cluster/node/status"` | no |
| lb\_health\_check\_interval | (Optional) Interval in seconds for checking the target group healthcheck. Defaults to 10. | `number` | `10` | no |
| lb\_tls\_certificate\_arn | ARN of the TLS certificate, imported in ACM, which will be used for the TLS listener on the load balancer. | `string` | `null` | no |
| lb\_tls\_certificate\_arn | ARN of the TLS certificate, imported in ACM, which will be used for the TLS listener on the load balancer. | `string` | `""` | no |
| lb\_tls\_policy | TLS security policy on the listener. | `string` | `"ELBSecurityPolicy-TLS13-1-2-2021-06"` | no |
| allowed\_inbound\_cidrs\_lb | (Optional) List of CIDR blocks to permit inbound traffic from to load balancer | `list(string)` | `null` | no |
| allowed\_inbound\_cidrs\_ssh | (Optional) List of CIDR blocks to permit for SSH to GraphDB nodes | `list(string)` | `null` | no |
Expand Down Expand Up @@ -146,7 +146,7 @@ Before you begin using this Terraform module, ensure you meet the following prer
| monitoring\_route53\_health\_check\_aws\_region | Define the region in which you want the monitoring to be deployed. It is used to define where the Route53 Availability Check will be deployed, since if it is not specified it will deploy the check in us-east-1 and if you deploy in different region it will not find the dimensions. | `string` | `"us-east-1"` | no |
| monitoring\_route53\_availability\_http\_port | Define the HTTP port for the Route53 availability check | `number` | `80` | no |
| monitoring\_route53\_availability\_https\_port | Define the HTTPS port for the Route53 availability check | `number` | `443` | no |
| monitoring\_route53\_healtcheck\_fqdn\_url | Define custom domain name for the Route53 Health check | `string` | `""` | no |
| monitoring\_route53\_healtcheck\_fqdn\_url | Define custom domain name for the Route53 Health check | `string` | n/a | yes |
| graphdb\_properties\_path | Path to a local file containing GraphDB properties (graphdb.properties) that would be appended to the default in the VM. | `string` | `null` | no |
| graphdb\_java\_options | GraphDB options to pass to GraphDB with GRAPHDB\_JAVA\_OPTS environment variable. | `string` | `null` | no |
| deploy\_logging\_module | Enable or disable logging module | `bool` | `false` | no |
Expand Down
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,13 @@ module "monitoring" {
cmk_key_alias = var.sns_cmk_key_alias
parameter_store_kms_key_arn = local.calculated_parameter_store_kms_key_arn
cloudwatch_log_group_retention_in_days = var.monitoring_log_group_retention_in_days
route53_availability_request_url = var.monitoring_route53_healtcheck_fqdn_url != "" ? var.monitoring_route53_healtcheck_fqdn_url : module.load_balancer.lb_dns_name
route53_availability_request_url = var.monitoring_route53_healtcheck_fqdn_url
route53_availability_measure_latency = var.monitoring_route53_measure_latency
sns_kms_key_arn = local.calculated_sns_kms_key_arn
graphdb_node_count = var.graphdb_node_count
route53_availability_http_string_type = local.calculated_http_string_type
route53_availability_port = var.lb_tls_certificate_arn != "" ? var.monitoring_route53_availability_http_port : var.monitoring_route53_availability_https_port
lb_tls_certificate_arn = var.lb_tls_certificate_arn
lb_dns_name = module.load_balancer.lb_dns_name != "" ? module.load_balancer.lb_dns_name : null
}

module "graphdb" {
Expand Down
4 changes: 2 additions & 2 deletions modules/monitoring/availability_tests.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ resource "aws_sns_topic_subscription" "graphdb_route53_sns_topic_subscription" {
resource "aws_route53_health_check" "graphdb_availability_check" {
provider = aws.useast1
failure_threshold = var.route53_availability_timeout
fqdn = var.route53_availability_request_url
port = var.route53_availability_port
fqdn = var.route53_availability_request_url != "" ? var.route53_availability_request_url : var.lb_dns_name
port = var.lb_tls_certificate_arn != "" ? var.route53_availability_https_port : var.route53_availability_http_port
request_interval = var.route53_availability_frequency
regions = var.route53_availability_regions
resource_path = var.graphdb_node_count == 1 ? "/protocol" : "/rest/cluster/node/status"
Expand Down
22 changes: 22 additions & 0 deletions modules/monitoring/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,25 @@ variable "graphdb_node_count" {
description = "Number of GraphDB nodes to deploy in ASG"
type = number
}

variable "route53_availability_http_port" {
description = "Define the HTTP port for the Route53 availability check"
type = number
default = 80
}

variable "route53_availability_https_port" {
description = "Define the HTTPS port for the Route53 availability check"
type = number
default = 443
}

variable "lb_tls_certificate_arn" {
description = "ARN of the TLS certificate, imported in ACM, which will be used for the TLS listener on the load balancer."
type = string
}

variable "lb_dns_name" {
description = "Define the LB DNS name"
type = string
}
3 changes: 1 addition & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ variable "lb_health_check_interval" {
variable "lb_tls_certificate_arn" {
description = "ARN of the TLS certificate, imported in ACM, which will be used for the TLS listener on the load balancer."
type = string
default = null
default = ""
}

variable "lb_tls_policy" {
Expand Down Expand Up @@ -377,7 +377,6 @@ variable "monitoring_route53_availability_https_port" {
variable "monitoring_route53_healtcheck_fqdn_url" {
description = "Define custom domain name for the Route53 Health check"
type = string
default = ""
}

# GraphDB overrides
Expand Down

0 comments on commit 8ce4468

Please sign in to comment.