github.com/nathanielks/terraform@v0.6.1-0.20170509030759-13e1a62319dc/website/source/docs/providers/aws/r/route53_health_check.html.markdown (about)

     1  ---
     2  layout: "aws"
     3  page_title: "AWS: aws_route53_health_check"
     4  sidebar_current: "docs-aws-resource-route53-health-check"
     5  description: |-
     6    Provides a Route53 health check.
     7  ---
     8  # aws\_route53\_health\_check
     9  
    10  Provides a Route53 health check.
    11  
    12  ## Example Usage
    13  
    14  ```hcl
    15  resource "aws_route53_health_check" "child1" {
    16    fqdn              = "foobar.terraform.com"
    17    port              = 80
    18    type              = "HTTP"
    19    resource_path     = "/"
    20    failure_threshold = "5"
    21    request_interval  = "30"
    22  
    23    tags = {
    24      Name = "tf-test-health-check"
    25    }
    26  }
    27  
    28  resource "aws_route53_health_check" "foo" {
    29    type                   = "CALCULATED"
    30    child_health_threshold = 1
    31    child_healthchecks     = ["${aws_route53_health_check.child1.id}"]
    32  
    33    tags = {
    34      Name = "tf-test-calculated-health-check"
    35    }
    36  }
    37  ```
    38  
    39  ## CloudWatch Alarm Example
    40  
    41  ```hcl
    42  resource "aws_cloudwatch_metric_alarm" "foobar" {
    43    alarm_name          = "terraform-test-foobar5"
    44    comparison_operator = "GreaterThanOrEqualToThreshold"
    45    evaluation_periods  = "2"
    46    metric_name         = "CPUUtilization"
    47    namespace           = "AWS/EC2"
    48    period              = "120"
    49    statistic           = "Average"
    50    threshold           = "80"
    51    alarm_description   = "This metric monitors ec2 cpu utilization"
    52  }
    53  
    54  resource "aws_route53_health_check" "foo" {
    55    type                            = "CLOUDWATCH_METRIC"
    56    cloudwatch_alarm_name           = "${aws_cloudwatch_metric_alarm.foobar.alarm_name}"
    57    cloudwatch_alarm_region         = "us-west-2"
    58    insufficient_data_health_status = "Healthy"
    59  }
    60  ```
    61  
    62  ## Argument Reference
    63  
    64  The following arguments are supported:
    65  
    66  * `reference_name` - (Optional) This is a reference name used in Caller Reference
    67      (helpful for identifying single health_check set amongst others)
    68  * `fqdn` - (Optional) The fully qualified domain name of the endpoint to be checked.
    69  * `ip_address` - (Optional) The IP address of the endpoint to be checked.
    70  * `port` - (Optional) The port of the endpoint to be checked.
    71  * `type` - (Required) The protocol to use when performing health checks. Valid values are `HTTP`, `HTTPS`, `HTTP_STR_MATCH`, `HTTPS_STR_MATCH`, `TCP`, `CALCULATED` and `CLOUDWATCH_METRIC`.
    72  * `failure_threshold` - (Required) The number of consecutive health checks that an endpoint must pass or fail.
    73  * `request_interval` - (Required) The number of seconds between the time that Amazon Route 53 gets a response from your endpoint and the time that it sends the next health-check request.
    74  * `resource_path` - (Optional) The path that you want Amazon Route 53 to request when performing health checks.
    75  * `search_string` - (Optional) String searched in the first 5120 bytes of the response body for check to be considered healthy.
    76  * `measure_latency` - (Optional) A Boolean value that indicates whether you want Route 53 to measure the latency between health checkers in multiple AWS regions and your endpoint and to display CloudWatch latency graphs in the Route 53 console.
    77  * `invert_healthcheck` - (Optional) A boolean value that indicates whether the status of health check should be inverted. For example, if a health check is healthy but Inverted is True , then Route 53 considers the health check to be unhealthy.
    78  * `enable_sni` - (Optional) A boolean value that indicates whether Route53 should send the `fqdn` to the endpoint when performing the health check. This defaults to AWS' defaults: when the `type` is "HTTPS" `enable_sni` defaults to `true`, when `type` is anything else `enable_sni` defaults to `false`.
    79  * `child_healthchecks` - (Optional) For a specified parent health check, a list of HealthCheckId values for the associated child health checks.
    80  * `child_health_threshold` - (Optional) The minimum number of child health checks that must be healthy for Route 53 to consider the parent health check to be healthy. Valid values are integers between 0 and 256, inclusive
    81  * `cloudwatch_alarm_name` - (Optional) The name of the CloudWatch alarm.
    82  * `cloudwatch_alarm_region` - (Optional) The CloudWatchRegion that the CloudWatch alarm was created in.
    83  * `insufficient_data_health_status` - (Optional) The status of the health check when CloudWatch has insufficient data about the state of associated alarm. Valid values are `Healthy` , `Unhealthy` and `LastKnownStatus`.
    84  
    85  * `tags` - (Optional) A mapping of tags to assign to the health check.
    86  
    87  At least one of either `fqdn` or `ip_address` must be specified.
    88  
    89  
    90  ## Import
    91  
    92  Route53 Health Checks can be imported using the `health check id`, e.g.
    93  
    94  ```
    95  $ terraform import aws_route53_health_check.http_check abcdef11-2222-3333-4444-555555fedcba
    96  ```