Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance synthetics to accept Datadog API output of test definitions #81

Merged
merged 4 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 17 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,6 @@ __Notes on Datadog child organizations:__
---

This project is part of our comprehensive ["SweetOps"](https://cpco.io/sweetops) approach towards DevOps.
[<img align="right" title="Share via Email" src="https://docs.cloudposse.com/images/ionicons/ios-email-outline-2.0.1-16x16-999999.svg"/>][share_email]
[<img align="right" title="Share on Google+" src="https://docs.cloudposse.com/images/ionicons/social-googleplus-outline-2.0.1-16x16-999999.svg" />][share_googleplus]
[<img align="right" title="Share on Facebook" src="https://docs.cloudposse.com/images/ionicons/social-facebook-outline-2.0.1-16x16-999999.svg" />][share_facebook]
[<img align="right" title="Share on Reddit" src="https://docs.cloudposse.com/images/ionicons/social-reddit-outline-2.0.1-16x16-999999.svg" />][share_reddit]
[<img align="right" title="Share on LinkedIn" src="https://docs.cloudposse.com/images/ionicons/social-linkedin-outline-2.0.1-16x16-999999.svg" />][share_linkedin]
[<img align="right" title="Share on Twitter" src="https://docs.cloudposse.com/images/ionicons/social-twitter-outline-2.0.1-16x16-999999.svg" />][share_twitter]


[![Terraform Open Source Modules](https://docs.cloudposse.com/images/terraform-open-source-modules.svg)][terraform_modules]
Expand Down Expand Up @@ -90,7 +84,8 @@ We maintain a comprehensive [catalog](catalog) of Datadog resources and welcome

The [examples/complete](examples/complete) in this module uses the catalog to provision the monitors on Datadog.

The [examples/synthetics](examples/synthetics) shows how to provision synthetics on Datadog for synthetic monitoring.
The [examples/synthetics](examples/synthetics) shows how to provision synthetic tests on Datadog for monitoring.
Consult the [synthetics README](modules/synthetics) module for more details.

The [examples/rbac](examples/rbac) shows how to use custom RBAC to provision Datadog roles with permissions and assign roles to monitors.

Expand Down Expand Up @@ -282,7 +277,7 @@ Available targets:

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_datadog"></a> [datadog](#requirement\_datadog) | >= 3.0.0 |

## Providers
Expand Down Expand Up @@ -345,8 +340,6 @@ Available targets:

Like this project? Please give it a ★ on [our GitHub](https://github.com/cloudposse/terraform-datadog-platform)! (it helps us **a lot**)

Are you using this project or any of our other projects? Consider [leaving a testimonial][testimonial]. =)



## Related Projects
Expand All @@ -363,6 +356,7 @@ For additional context, refer to some of these links.

- [Terraform Datadog monitor resources](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/monitor) - Provides a Datadog monitor resource. Used to create and manage Datadog monitors
- [Create a monitor](https://docs.datadoghq.com/api/v1/monitors/#create-a-monitor) - Create datadog monitors
- [Datadog Synthetic Monitoring](https://docs.datadoghq.com/synthetics/) - Official Datadog documentation on Synthetic Monitoring
- [Terraform Datadog role resources](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/role) - Provides a Datadog role resource. Used to create and manage Datadog roles
- [Datadog permissions](https://registry.terraform.io/providers/DataDog/datadog/latest/docs/data-sources/permissions) - Use this data source to retrieve the list of Datadog permissions by name and their corresponding ID, for use in the role resource
- [Role Based Access Control](https://docs.datadoghq.com/account_management/rbac) - Roles categorize users and define what account permissions those users have, such as what data they can read or what account assets they can modify
Expand Down Expand Up @@ -403,10 +397,6 @@ We deliver 10x the value for a fraction of the cost of a full-time engineer. Our

Join our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.

## Discourse Forums

Participate in our [Discourse Forums][discourse]. Here you'll find answers to commonly asked questions. Most questions will be related to the enormous number of projects we support on our GitHub. Come here to collaborate on answers, find solutions, and get ideas about the products and services we value. It only takes a minute to get started! Just sign in with SSO using your GitHub account.

## Newsletter

Sign up for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
Expand All @@ -417,7 +407,18 @@ Sign up for [our newsletter][newsletter] that covers everything on our technolog

[![zoom](https://img.cloudposse.com/fit-in/200x200/https://cloudposse.com/wp-content/uploads/2019/08/Powered-by-Zoom.png")][office_hours]

## Contributing
## ✨ Contributing



This project is under active development, and we encourage contributions from our community.
Many thanks to our outstanding contributors:

<a href="https://github.com/cloudposse/terraform-datadog-platform/graphs/contributors">
<img src="https://contrib.rocks/image?repo=cloudposse/terraform-datadog-platform&max=24" />
</a>



### Bug Reports & Feature Requests

Expand Down Expand Up @@ -491,31 +492,7 @@ We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. W

We offer [paid support][commercial_support] on all of our projects.

Check out [our other projects][github], [follow us on twitter][twitter], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.



### Contributors

<!-- markdownlint-disable -->
| [![Erik Osterman][osterman_avatar]][osterman_homepage]<br/>[Erik Osterman][osterman_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]<br/>[Andriy Knysh][aknysh_homepage] | [![Vladimir][SweetOps_avatar]][SweetOps_homepage]<br/>[Vladimir][SweetOps_homepage] | [![Yonatan Koren][korenyoni_avatar]][korenyoni_homepage]<br/>[Yonatan Koren][korenyoni_homepage] | [![RB][nitrocode_avatar]][nitrocode_homepage]<br/>[RB][nitrocode_homepage] | [![Benjamin Smith][benbentwo_avatar]][benbentwo_homepage]<br/>[Benjamin Smith][benbentwo_homepage] |
|---|---|---|---|---|---|
<!-- markdownlint-restore -->

[osterman_homepage]: https://github.com/osterman
[osterman_avatar]: https://img.cloudposse.com/150x150/https://github.com/osterman.png
[aknysh_homepage]: https://github.com/aknysh
[aknysh_avatar]: https://img.cloudposse.com/150x150/https://github.com/aknysh.png
[SweetOps_homepage]: https://github.com/SweetOps
[SweetOps_avatar]: https://img.cloudposse.com/150x150/https://github.com/SweetOps.png
[korenyoni_homepage]: https://github.com/korenyoni
[korenyoni_avatar]: https://img.cloudposse.com/150x150/https://github.com/korenyoni.png
[nitrocode_homepage]: https://github.com/nitrocode
[nitrocode_avatar]: https://img.cloudposse.com/150x150/https://github.com/nitrocode.png
[benbentwo_homepage]: https://github.com/benbentwo
[benbentwo_avatar]: https://img.cloudposse.com/150x150/https://github.com/benbentwo.png

[![README Footer][readme_footer_img]][readme_footer_link]
Check out [our other projects][github], [follow us on twitter][twitter], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation.[![README Footer][readme_footer_img]][readme_footer_link]
[![Beacon][beacon]][website]
<!-- markdownlint-disable -->
[logo]: https://cloudposse.com/logo-300x69.svg
Expand All @@ -525,12 +502,10 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
[jobs]: https://cpco.io/jobs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=jobs
[hire]: https://cpco.io/hire?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=hire
[slack]: https://cpco.io/slack?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=slack
[linkedin]: https://cpco.io/linkedin?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=linkedin
[twitter]: https://cpco.io/twitter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=twitter
[testimonial]: https://cpco.io/leave-testimonial?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=testimonial
[office_hours]: https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=office_hours
[newsletter]: https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=newsletter
[discourse]: https://ask.sweetops.com/?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=discourse
[email]: https://cpco.io/email?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=email
[commercial_support]: https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=commercial_support
[we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=we_love_open_source
Expand All @@ -541,11 +516,5 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
[readme_footer_link]: https://cloudposse.com/readme/footer/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=readme_footer_link
[readme_commercial_support_img]: https://cloudposse.com/readme/commercial-support/img
[readme_commercial_support_link]: https://cloudposse.com/readme/commercial-support/link?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-datadog-platform&utm_content=readme_commercial_support_link
[share_twitter]: https://twitter.com/intent/tweet/?text=terraform-datadog-platform&url=https://github.com/cloudposse/terraform-datadog-platform
[share_linkedin]: https://www.linkedin.com/shareArticle?mini=true&title=terraform-datadog-platform&url=https://github.com/cloudposse/terraform-datadog-platform
[share_reddit]: https://reddit.com/submit/?url=https://github.com/cloudposse/terraform-datadog-platform
[share_facebook]: https://facebook.com/sharer/sharer.php?u=https://github.com/cloudposse/terraform-datadog-platform
[share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-datadog-platform
[share_email]: mailto:?subject=terraform-datadog-platform&body=https://github.com/cloudposse/terraform-datadog-platform
[beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-datadog-platform?pixel&cs=github&cm=readme&an=terraform-datadog-platform
<!-- markdownlint-restore -->
7 changes: 6 additions & 1 deletion README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ introduction: |-

The [examples/complete](examples/complete) in this module uses the catalog to provision the monitors on Datadog.

The [examples/synthetics](examples/synthetics) shows how to provision synthetics on Datadog for synthetic monitoring.
The [examples/synthetics](examples/synthetics) shows how to provision synthetic tests on Datadog for monitoring.
Consult the [synthetics README](modules/synthetics) module for more details.

The [examples/rbac](examples/rbac) shows how to use custom RBAC to provision Datadog roles with permissions and assign roles to monitors.

Expand All @@ -104,6 +105,10 @@ references:
description: "Create datadog monitors"
url: "https://docs.datadoghq.com/api/v1/monitors/#create-a-monitor"

- name: "Datadog Synthetic Monitoring"
description: "Official Datadog documentation on Synthetic Monitoring"
url: "https://docs.datadoghq.com/synthetics/"

- name: "Terraform Datadog role resources"
description: "Provides a Datadog role resource. Used to create and manage Datadog roles"
url: "https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/role"
Expand Down
2 changes: 1 addition & 1 deletion docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.0 |
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_datadog"></a> [datadog](#requirement\_datadog) | >= 3.0.0 |

## Providers
Expand Down
4 changes: 0 additions & 4 deletions examples/child_organization/fixtures.us-east-2.tfvars
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
enabled = true

region = "us-east-2"

namespace = "eg"

stage = "test"
Expand Down
4 changes: 0 additions & 4 deletions examples/child_organization/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@
provider "datadog" {
validate = false
}

provider "aws" {
region = var.region
}
5 changes: 0 additions & 5 deletions examples/child_organization/variables.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# https://docs.datadoghq.com/account_management/org_settings/#overview

variable "region" {
type = string
description = "AWS region"
}

variable "organization_name" {
type = string
description = "Datadog organization name"
Expand Down
6 changes: 1 addition & 5 deletions examples/child_organization/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
terraform {
required_version = ">= 0.13.0"
required_version = ">= 1.0.0"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
datadog = {
source = "datadog/datadog"
version = ">= 3.0.0"
Expand Down
2 changes: 0 additions & 2 deletions examples/complete/fixtures.us-east-2.tfvars
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
region = "us-east-2"

namespace = "eg"

stage = "test"
Expand Down
4 changes: 0 additions & 4 deletions examples/complete/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@
# https://registry.terraform.io/providers/DataDog/datadog/latest/docs#argument-reference
provider "datadog" {
}

provider "aws" {
region = var.region
}
5 changes: 0 additions & 5 deletions examples/complete/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
variable "region" {
type = string
description = "AWS region"
}

variable "alert_tags" {
type = list(string)
description = "List of alert tags to add to all alert messages, e.g. `[\"@opsgenie\"]` or `[\"@devops\", \"@opsgenie\"]`"
Expand Down
6 changes: 1 addition & 5 deletions examples/complete/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
terraform {
required_version = ">= 0.13.0"
required_version = ">= 1.0.0"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
datadog = {
source = "datadog/datadog"
version = ">= 3.0.0"
Expand Down
4 changes: 0 additions & 4 deletions examples/organization_settings/fixtures.us-east-2.tfvars
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
enabled = true

region = "us-east-2"

namespace = "eg"

stage = "test"
Expand Down
4 changes: 0 additions & 4 deletions examples/organization_settings/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,3 @@
provider "datadog" {
validate = false
}

provider "aws" {
region = var.region
}
5 changes: 0 additions & 5 deletions examples/organization_settings/variables.tf
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# https://docs.datadoghq.com/account_management/org_settings/#overview

variable "region" {
type = string
description = "AWS region"
}

variable "organization_name" {
type = string
description = "Datadog organization name"
Expand Down
6 changes: 1 addition & 5 deletions examples/organization_settings/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
terraform {
required_version = ">= 0.13.0"
required_version = ">= 1.0.0"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
datadog = {
source = "datadog/datadog"
version = ">= 3.0.0"
Expand Down
4 changes: 0 additions & 4 deletions examples/rbac/fixtures.us-east-2.tfvars
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
enabled = true

region = "us-east-2"

namespace = "eg"

stage = "test"
Expand Down
4 changes: 0 additions & 4 deletions examples/rbac/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,3 @@
# https://registry.terraform.io/providers/DataDog/datadog/latest/docs#argument-reference
provider "datadog" {
}

provider "aws" {
region = var.region
}
5 changes: 0 additions & 5 deletions examples/rbac/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
variable "region" {
type = string
description = "AWS region"
}

variable "alert_tags" {
type = list(string)
description = "List of alert tags to add to all alert messages, e.g. `[\"@opsgenie\"]` or `[\"@devops\", \"@opsgenie\"]`"
Expand Down
6 changes: 1 addition & 5 deletions examples/rbac/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
terraform {
required_version = ">= 0.13.0"
required_version = ">= 1.0.0"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
datadog = {
source = "datadog/datadog"
version = ">= 3.0.0"
Expand Down
4 changes: 0 additions & 4 deletions examples/slo/fixtures.us-east-2.tfvars
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
enabled = true

region = "us-east-2"

namespace = "eg"

stage = "test"
Expand Down
3 changes: 0 additions & 3 deletions examples/slo/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@ provider "datadog" {
validate = false
}

provider "aws" {
region = var.region
}
5 changes: 0 additions & 5 deletions examples/slo/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
variable "region" {
type = string
description = "AWS region"
}

variable "slo_paths" {
type = list(string)
description = "List of paths to Datadog SLO configurations"
Expand Down
6 changes: 1 addition & 5 deletions examples/slo/versions.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
terraform {
required_version = ">= 0.13.0"
required_version = ">= 1.0.0"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
datadog = {
source = "datadog/datadog"
version = ">= 3.0.0"
Expand Down
Loading