Set up a CloudWatch Synthetics Canary with ease. Creates all resources required to have a functional Canary in no time.
- Creates policies, buckets, and the Canary.
- Configures the bucket with lifecycle polices based on a 30 day data retention policy.
Name | Version |
---|---|
terraform | ~> 1.9 |
archive | ~> 2.0 |
aws | ~> 5.0 |
local | ~> 2.0 |
null | ~> 3.0 |
Name | Version |
---|---|
archive | 2.6.0 |
aws | 5.74.0 |
null | 3.2.3 |
No modules.
Name | Type |
---|---|
aws_iam_policy.canary_role_inline_policy | resource |
aws_iam_role.canary_role | resource |
aws_iam_role_policy_attachment.canary_role_inline_policy | resource |
aws_s3_bucket.canary_bucket | resource |
aws_s3_bucket_lifecycle_configuration.canary_bucket_lifecycle | resource |
aws_s3_bucket_versioning.canary_bucket_versioning | resource |
aws_s3_object.canary_script_object | resource |
aws_synthetics_canary.canary | resource |
null_resource.cleanup | resource |
archive_file.lambda | data source |
aws_iam_policy_document.canary_role_inline_policy | data source |
aws_iam_policy_document.canary_role_trust_policy | data source |
aws_region.current | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
aws_tags | Additional tags to apply to this module. | map(string) |
{} |
no |
cwsyn_canary_env | The CloudWatch Synthetics Canary environment variables. If using the default Lambda function, specify the URLS as a string-encoded JSON array. | map(string) |
{ |
no |
cwsyn_canary_lambda_handler | The handler function to use when invoking the Lambda function. | string |
"lambda.handler" |
no |
cwsyn_canary_lambda_script_location | The location of the Lambda Function artifact to use - must be a directory. Leave unspecified to use the Function that ships with this module. | string |
null |
no |
cwsyn_canary_name | Name to assign to the Canary. | string |
n/a | yes |
cwsyn_canary_rate | The rate expression to use with the CloudWatch Synthetics Canary. | string |
"rate(1 minute)" |
no |
cwsyn_canary_runtime | The runtime to use with this Canary. | string |
"syn-python-selenium-4.1" |
no |
No outputs.
module "trailwatch_canary" {
source = "terraform-trailwatch-modules/synthetics-canary/aws"
cwsyn_canary_name = "website-monitor"
}
module "trailwatch_canary" {
source = "terraform-trailwatch-modules/synthetics-canary/aws"
cwsyn_canary_name = "website_monitor"
cwsyn_canary_runtime = "syn-python-selenium-4.0"
cwsyn_canary_lambda_handler = "lambda.my_function"
cwsyn_canary_lambda_script_location = "./path/to/directory"
cwysn_canary_env = {"A_ENV": "B"}
cwsyN_canary_rate = "rate(5 minutes)"
...
}
For a detailed list of changes, please refer to the CHANGELOG.md.
This module is licensed under the MIT License.