Skip to content

CloudWatch Synthetic Canaries are scripts that monitor your endpoints and APIs from the outside-in. Canaries help you check the availability and latency of your web services

License

Notifications You must be signed in to change notification settings

binbashar/terraform-aws-cloudwatch-synthetics

Β 
Β 

Banner

Terraform AWS Cloudwatch Alarms

With our comprehensive DevOps toolkit - streamline operations, automate workflows, enhance collaboration and, most importantly, deploy with confidence.

Latest Release tfsec Licence Changelog


We are a group of DevOps engineers & architects, joining hands in this ever evolving digital landscape. With our strong belief in Automation; just like microservices, always on the lookout to split the the infrastructure into smaller connected resources (database, cluster and more) which could be standardized, are manageable, scalable, secure & follow industry best practices.

This module includes Terraform open source, examples, and automation tests (for better understanding), which would help you create and improve your infrastructure with minimalistic coding.

Prerequisites and Providers

This table contains both Prerequisites and Providers:

Description Name Version
Prerequisite Terraform >= 1.6.6
Provider aws >= 5.31.0

Examples

πŸ“Œ For additional usage examples, check the complete list under examples/ directory.

Here are some examples of how you can use this module in your inventory structure:

Basic Example

  module "target-canary" {
    source = "git::https://github.com/binbashar/terraform-aws-cloudwatch-synthetics.git?ref=FEATURE/improving-module"
  
    name_prefix = "canary"
    environment = "test"
  
    schedule_expression = "rate(5 minutes)"
    s3_artifact_bucket  = "my-test-artifact-bucket" # must pre-exist
    alarm_email         = null      # an email or null value
    endpoints           = { "target-group" = { url = "http://www.binbash.co/" } }
    managedby           = "[email protected]"
    repository          = "https://github.com/binbashar/terraform-aws-cloudwatch-synthetics"
  
    # what networks it has to work in?
    subnet_ids                = data.terraform_remote_state.local-vpcs.outputs.private_subnets
    security_group_ids        = [aws_security_group.target-canary-sg.id]
  
    tags = local.tags
  
    depends_on = [module.target_canary_s3_bucket, aws_security_group.target-canary-sg]
  }

Note it is using FEATURE/improving-module branch while in development.

Inputs

Name Description Type Default Required
alarm_email Email address to send alarms to string n/a yes
create_topic Whether or not create the topic, topic_name_suffix required if false bool true yes
endpoints n/a
map(object({
url = string
}))
n/a yes
environment Environment (e.g. prod, dev, staging). string "" no
existent_topic_arn If create_topic is false this is required and is the arn of an already existent topic string n/a no
label_order Label order, e.g. name,application. list(any) [] no
managedby ManagedBy, eg 'CloudDrove'. string "[email protected]" no
name Name (e.g. app or cluster). string "" no
repository Terraform current module repo string "https://github.com/binbashar/terraform-aws-cloudwatch-synthetics" no
runtime_version Runtime version for the lambda. string syn-nodejs-puppeteer-6.2 no
s3_artifact_bucket Location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary string n/a yes
schedule_expression Expression defining how often the canary runs string n/a yes
security_group_ids IDs of the security groups for this canary list(string) null no
subnet_ids IDs of the subnets where this canary is to run list(string) null no
topic_name_suffix Topic name suffix, will be prepended with name_prefix string n/a yes
tags The json object with tags to be added to resources map(string) n/a yes

Outputs

Name Description
topic_arn The ARN for the alarm topic (whether it is created or already existent, see create_topic input)

Feedback

Spot a bug or have thoughts to share with us? Let's squash it together! Log it in our issue tracker, feel free to drop us an email at [email protected].

Show some love with a β˜… on our GitHub! if our work has brightened your day! – your feedback fuels our journey!

πŸš€ Our Accomplishment

We have 100+ Terraform modules πŸ™Œ. You could consider them finished, but, with enthusiasts like yourself, we are able to ever improve them, so we call our status - improvement in progress.

Join Our Slack Community

Join our vibrant open-source slack community and embark on an ever-evolving journey with CloudDrove; helping you in moving upwards in your career path. Join our vibrant Open Source Slack Community and embark on a learning journey with CloudDrove. Grow with us in the world of DevOps and set your career on a path of consistency.

πŸŒπŸ’¬What you'll get after joining this Slack community:

  • πŸš€ Encouragement to upgrade your best version.
  • 🌈 Learning companionship with our DevOps squad.
  • 🌱 Relentless growth with daily updates on new advancements in technologies.

Join our tech elites Join Now πŸš€

Explore Our Blogs

Click here πŸ“š 🌟

Tap into our capabilities

We provide a platform for organizations to engage with experienced top-tier DevOps & Cloud services. Tap into our pool of certified engineers and architects to elevate your DevOps and Cloud Solutions.

At CloudDrove, has extensive experience in designing, building & migrating environments, securing, consulting, monitoring, optimizing, automating, and maintaining complex and large modern systems. With remarkable client footprints in American & European corridors, our certified architects & engineers are ready to serve you as per your requirements & schedule. Write to us at [email protected].

We are The Cloud Experts!


We ❀️ Open Source and you can check out our other modules to get help with your new Cloud ideas.

About

CloudWatch Synthetic Canaries are scripts that monitor your endpoints and APIs from the outside-in. Canaries help you check the availability and latency of your web services

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 86.8%
  • Smarty 12.3%
  • Makefile 0.9%