-
Notifications
You must be signed in to change notification settings - Fork 1.3k
SDCD-2163 | Add docs on terraform #33829
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
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -107,6 +107,50 @@ | |
| {{% /tab %}} | ||
| {{< /tabs >}} | ||
|
|
||
| ## Managing Deployment Gates | ||
|
|
||
| You can manage Deployment Gates via the UI, API or Terraform. | ||
|
Check warning on line 112 in content/en/deployment_gates/setup.md
|
||
Aaron-9900 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| - **API**: You can use the [Deployment Gates API][1] to create and manage Deployment Gates. | ||
| - **Terraform**: You can use the [Datadog Terraform provider][2] to create and manage Deployment Gates. For example: | ||
Aaron-9900 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ```yaml | ||
| # Create new deployment_gate resource | ||
|
|
||
| resource "datadog_deployment_gate" "foo" { | ||
| dry_run = "false" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The example sets Useful? React with 👍 / 👎.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both work! |
||
| env = "production" | ||
| identifier = "my-gate" | ||
| service = "my-service" | ||
|
|
||
| rule { | ||
| name = "fdd" | ||
| type = "faulty_deployment_detection" | ||
| dry_run = false | ||
| options { | ||
| duration = 1300 | ||
| excluded_resources = ["GET api/v1/test"] | ||
| } | ||
| } | ||
|
|
||
| rule { | ||
| name = "monitor" | ||
| type = "monitor" | ||
| dry_run = false | ||
| options { | ||
| query = "service:test-service" | ||
| duration = 1300 | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Will create a deployment gate and it will be completely managed by terraform. Any changes to the gate applied in the UI will be overwritten by the terraform configuration. | ||
|
Check warning on line 148 in content/en/deployment_gates/setup.md
|
||
Aaron-9900 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
| [1]: https://docs.datadoghq.com/api/latest/deployment-gates/ | ||
| [2]: https://registry.terraform.io/providers/DataDog/datadog/latest/docs/resources/deployment_gate | ||
Aaron-9900 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Evaluate Deployment Gates | ||
|
|
||
| Once you have configured the gates and rules, you can request a gate evaluation when deploying the related service, and decide whether to block or continue the deployment based on the result. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.