diff --git a/README.md b/README.md index 78e83cf..88e7dda 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# README # +# README - DataDog Monitors # This repository is used to store all our monitors templates. -These templates have to be used with dedicated agent configurations and ressource tagging to works as expected. +These templates have to be used with dedicated agent configurations and resource tagging to works as expected. ### How to contribute ? ### @@ -10,13 +10,11 @@ The easiest way to contribute on this repository is to add monitors file inside ### Important notes ### -*This repository will be included as a Terraform module source. - -*Each monitors have to be disabled by default, so you have to manage this condition when you create your monitors. +* This repository will be included as a Terraform module source. +* Each monitors have to be disabled by default, so you have to manage this condition when you create your monitors. +* If you override a basic monitor with a custom one, you have to use tag filters on you query. (Example dd_cpu_high, if you want to override default cpu monitors) -*If you override a basic monitor with a custom one, you have to use tag filters on you query. (Example dd_cpu_high, if you want to override default cpu monitors) - -### Main.tf : add the datadog provider ### +### Main.tf : add the DataDog provider ### ``` provider "datadog" { @@ -29,7 +27,7 @@ provider "datadog" { ``` module "datadog-monitors" { - source = "git::ssh://git@bitbucket.org/morea/terraform.datadog.monitors.git" + source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git//{module-path}?ref={version}" critical_escalation_group = "${var.critical_escalation_group}" warning_escalation_group = "${var.warning_escalation_group}" diff --git a/cloud/aws/elb/inputs.tf b/cloud/aws/elb/inputs.tf new file mode 120000 index 0000000..a68ace3 --- /dev/null +++ b/cloud/aws/elb/inputs.tf @@ -0,0 +1 @@ +../../../inputs.tf \ No newline at end of file diff --git a/monitors_elb.tf b/cloud/aws/elb/monitors-elb.tf similarity index 100% rename from monitors_elb.tf rename to cloud/aws/elb/monitors-elb.tf diff --git a/cloud/aws/rds-mysql/inputs.tf b/cloud/aws/rds-mysql/inputs.tf new file mode 120000 index 0000000..a68ace3 --- /dev/null +++ b/cloud/aws/rds-mysql/inputs.tf @@ -0,0 +1 @@ +../../../inputs.tf \ No newline at end of file diff --git a/monitors-rds_mysql-basics.tf b/cloud/aws/rds-mysql/monitors-rds_mysql-basics.tf similarity index 100% rename from monitors-rds_mysql-basics.tf rename to cloud/aws/rds-mysql/monitors-rds_mysql-basics.tf diff --git a/monitors-unready/monitors-apache-nat.tf b/incubator/monitors-apache-nat.tf similarity index 100% rename from monitors-unready/monitors-apache-nat.tf rename to incubator/monitors-apache-nat.tf diff --git a/monitors-unready/monitors-cassandra.tf b/incubator/monitors-cassandra.tf similarity index 100% rename from monitors-unready/monitors-cassandra.tf rename to incubator/monitors-cassandra.tf diff --git a/monitors-unready/monitors-gcp-cloud-sql.tf b/incubator/monitors-gcp-cloud-sql.tf similarity index 100% rename from monitors-unready/monitors-gcp-cloud-sql.tf rename to incubator/monitors-gcp-cloud-sql.tf diff --git a/monitors-unready/monitors-gcp-lb.tf b/incubator/monitors-gcp-lb.tf similarity index 100% rename from monitors-unready/monitors-gcp-lb.tf rename to incubator/monitors-gcp-lb.tf diff --git a/monitors-unready/monitors-gcp-vpn.tf b/incubator/monitors-gcp-vpn.tf similarity index 100% rename from monitors-unready/monitors-gcp-vpn.tf rename to incubator/monitors-gcp-vpn.tf diff --git a/monitors-unready/monitors-kubernetes.tf b/incubator/monitors-kubernetes.tf similarity index 100% rename from monitors-unready/monitors-kubernetes.tf rename to incubator/monitors-kubernetes.tf diff --git a/monitors-unready/monitors-linux-basics.log b/incubator/monitors-linux-basics.log similarity index 100% rename from monitors-unready/monitors-linux-basics.log rename to incubator/monitors-linux-basics.log diff --git a/monitors-unready/monitors-linux-basics.tf b/incubator/monitors-linux-basics.tf similarity index 100% rename from monitors-unready/monitors-linux-basics.tf rename to incubator/monitors-linux-basics.tf diff --git a/monitors-unready/monitors-redis-containers.tf b/incubator/monitors-redis-containers.tf similarity index 100% rename from monitors-unready/monitors-redis-containers.tf rename to incubator/monitors-redis-containers.tf diff --git a/monitors-unready/monitors-redis.tf b/incubator/monitors-redis.tf similarity index 100% rename from monitors-unready/monitors-redis.tf rename to incubator/monitors-redis.tf diff --git a/middleware/apache/inputs.tf b/middleware/apache/inputs.tf new file mode 120000 index 0000000..cdfc6c6 --- /dev/null +++ b/middleware/apache/inputs.tf @@ -0,0 +1 @@ +../../inputs.tf \ No newline at end of file diff --git a/monitors_apache.tf b/middleware/apache/monitors-apache.tf similarity index 100% rename from monitors_apache.tf rename to middleware/apache/monitors-apache.tf diff --git a/middleware/nginx/inputs.tf b/middleware/nginx/inputs.tf new file mode 120000 index 0000000..cdfc6c6 --- /dev/null +++ b/middleware/nginx/inputs.tf @@ -0,0 +1 @@ +../../inputs.tf \ No newline at end of file diff --git a/monitors_nginx.tf b/middleware/nginx/monitors-nginx.tf similarity index 100% rename from monitors_nginx.tf rename to middleware/nginx/monitors-nginx.tf diff --git a/middleware/php-fpm/inputs.tf b/middleware/php-fpm/inputs.tf new file mode 120000 index 0000000..cdfc6c6 --- /dev/null +++ b/middleware/php-fpm/inputs.tf @@ -0,0 +1 @@ +../../inputs.tf \ No newline at end of file diff --git a/monitors_fpm.tf b/middleware/php-fpm/monitors-fpm.tf similarity index 100% rename from monitors_fpm.tf rename to middleware/php-fpm/monitors-fpm.tf diff --git a/system/generic/inputs.tf b/system/generic/inputs.tf new file mode 120000 index 0000000..cdfc6c6 --- /dev/null +++ b/system/generic/inputs.tf @@ -0,0 +1 @@ +../../inputs.tf \ No newline at end of file diff --git a/monitors-custom-cpu.tf b/system/generic/monitors-custom-cpu.tf similarity index 100% rename from monitors-custom-cpu.tf rename to system/generic/monitors-custom-cpu.tf diff --git a/system/linux/inputs.tf b/system/linux/inputs.tf new file mode 120000 index 0000000..cdfc6c6 --- /dev/null +++ b/system/linux/inputs.tf @@ -0,0 +1 @@ +../../inputs.tf \ No newline at end of file diff --git a/monitors-linux-basics.tf b/system/linux/monitors-linux-basics.tf similarity index 100% rename from monitors-linux-basics.tf rename to system/linux/monitors-linux-basics.tf diff --git a/testing/dummy/dummy.tf b/testing/dummy/dummy.tf new file mode 100644 index 0000000..f5cc69c --- /dev/null +++ b/testing/dummy/dummy.tf @@ -0,0 +1,3 @@ + + +resource "null_resource" "test-migration" {} \ No newline at end of file diff --git a/testing/modules.tf b/testing/modules.tf index 5574a18..258d85b 100644 --- a/testing/modules.tf +++ b/testing/modules.tf @@ -1,5 +1,5 @@ module "datadog-monitors" { - source = "git::ssh://git@bitbucket.org/morea/terraform.datadog.monitors.git" + source = "git::ssh://git@bitbucket.org/morea/terraform.feature.datadog.git" env = "${var.environment}" region = "${var.region}" @@ -12,4 +12,3 @@ module "datadog-monitors" { dd_linux_basics = "${var.dd_linux_basics}" } -