Provides a Datadog DeploymentGate resource. This can be used to create and manage Datadog deployment_gate.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as datadog from "@pulumi/datadog";
// Create new deployment_gate resource
const foo = new datadog.DeploymentGate("foo", {
dryRun: false,
env: "production",
identifier: "my-gate",
service: "my-service",
rules: [
{
name: "fdd",
type: "faulty_deployment_detection",
dryRun: false,
options: [{
duration: 1300,
excludedResources: ["GET api/v1/test"],
}],
},
{
name: "monitor",
type: "monitor",
dryRun: false,
options: [{
query: "service:test-service",
duration: 1300,
}],
},
],
});
import pulumi
import pulumi_datadog as datadog
# Create new deployment_gate resource
foo = datadog.DeploymentGate("foo",
dry_run=False,
env="production",
identifier="my-gate",
service="my-service",
rules=[
{
"name": "fdd",
"type": "faulty_deployment_detection",
"dry_run": False,
"options": [{
"duration": 1300,
"excludedResources": ["GET api/v1/test"],
}],
},
{
"name": "monitor",
"type": "monitor",
"dry_run": False,
"options": [{
"query": "service:test-service",
"duration": 1300,
}],
},
])
package main
import (
"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create new deployment_gate resource
_, err := datadog.NewDeploymentGate(ctx, "foo", &datadog.DeploymentGateArgs{
DryRun: pulumi.Bool(false),
Env: pulumi.String("production"),
Identifier: pulumi.String("my-gate"),
Service: pulumi.String("my-service"),
Rules: datadog.DeploymentGateRuleArray{
&datadog.DeploymentGateRuleArgs{
Name: pulumi.String("fdd"),
Type: pulumi.String("faulty_deployment_detection"),
DryRun: pulumi.Bool(false),
Options: datadog.DeploymentGateRuleOptionsArgs{
map[string]interface{}{
"duration": 1300,
"excludedResources": []string{
"GET api/v1/test",
},
},
},
},
&datadog.DeploymentGateRuleArgs{
Name: pulumi.String("monitor"),
Type: pulumi.String("monitor"),
DryRun: pulumi.Bool(false),
Options: datadog.DeploymentGateRuleOptionsArgs{
map[string]interface{}{
"query": "service:test-service",
"duration": 1300,
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Datadog = Pulumi.Datadog;
return await Deployment.RunAsync(() =>
{
// Create new deployment_gate resource
var foo = new Datadog.DeploymentGate("foo", new()
{
DryRun = false,
Env = "production",
Identifier = "my-gate",
Service = "my-service",
Rules = new[]
{
new Datadog.Inputs.DeploymentGateRuleArgs
{
Name = "fdd",
Type = "faulty_deployment_detection",
DryRun = false,
Options = new[]
{
{
{ "duration", 1300 },
{ "excludedResources", new[]
{
"GET api/v1/test",
} },
},
},
},
new Datadog.Inputs.DeploymentGateRuleArgs
{
Name = "monitor",
Type = "monitor",
DryRun = false,
Options = new[]
{
{
{ "query", "service:test-service" },
{ "duration", 1300 },
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.datadog.DeploymentGate;
import com.pulumi.datadog.DeploymentGateArgs;
import com.pulumi.datadog.inputs.DeploymentGateRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
// Create new deployment_gate resource
var foo = new DeploymentGate("foo", DeploymentGateArgs.builder()
.dryRun(false)
.env("production")
.identifier("my-gate")
.service("my-service")
.rules(
DeploymentGateRuleArgs.builder()
.name("fdd")
.type("faulty_deployment_detection")
.dryRun(false)
.options(DeploymentGateRuleOptionsArgs.builder()
.duration(1300)
.excludedResources("GET api/v1/test")
.build())
.build(),
DeploymentGateRuleArgs.builder()
.name("monitor")
.type("monitor")
.dryRun(false)
.options(DeploymentGateRuleOptionsArgs.builder()
.query("service:test-service")
.duration(1300)
.build())
.build())
.build());
}
}
resources:
# Create new deployment_gate resource
foo:
type: datadog:DeploymentGate
properties:
dryRun: 'false'
env: production
identifier: my-gate
service: my-service
rules:
- name: fdd
type: faulty_deployment_detection
dryRun: false
options:
- duration: 1300
excludedResources:
- GET api/v1/test
- name: monitor
type: monitor
dryRun: false
options:
- query: service:test-service
duration: 1300
Create DeploymentGate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DeploymentGate(name: string, args: DeploymentGateArgs, opts?: CustomResourceOptions);@overload
def DeploymentGate(resource_name: str,
args: DeploymentGateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DeploymentGate(resource_name: str,
opts: Optional[ResourceOptions] = None,
env: Optional[str] = None,
service: Optional[str] = None,
dry_run: Optional[bool] = None,
identifier: Optional[str] = None,
rules: Optional[Sequence[DeploymentGateRuleArgs]] = None)func NewDeploymentGate(ctx *Context, name string, args DeploymentGateArgs, opts ...ResourceOption) (*DeploymentGate, error)public DeploymentGate(string name, DeploymentGateArgs args, CustomResourceOptions? opts = null)
public DeploymentGate(String name, DeploymentGateArgs args)
public DeploymentGate(String name, DeploymentGateArgs args, CustomResourceOptions options)
type: datadog:DeploymentGate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args DeploymentGateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args DeploymentGateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args DeploymentGateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DeploymentGateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DeploymentGateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var deploymentGateResource = new Datadog.DeploymentGate("deploymentGateResource", new()
{
Env = "string",
Service = "string",
DryRun = false,
Identifier = "string",
Rules = new[]
{
new Datadog.Inputs.DeploymentGateRuleArgs
{
Name = "string",
Type = "string",
DryRun = false,
Id = "string",
Options = new Datadog.Inputs.DeploymentGateRuleOptionsArgs
{
Duration = 0,
ExcludedResources = new[]
{
"string",
},
Query = "string",
},
},
},
});
example, err := datadog.NewDeploymentGate(ctx, "deploymentGateResource", &datadog.DeploymentGateArgs{
Env: pulumi.String("string"),
Service: pulumi.String("string"),
DryRun: pulumi.Bool(false),
Identifier: pulumi.String("string"),
Rules: datadog.DeploymentGateRuleArray{
&datadog.DeploymentGateRuleArgs{
Name: pulumi.String("string"),
Type: pulumi.String("string"),
DryRun: pulumi.Bool(false),
Id: pulumi.String("string"),
Options: &datadog.DeploymentGateRuleOptionsArgs{
Duration: pulumi.Int(0),
ExcludedResources: pulumi.StringArray{
pulumi.String("string"),
},
Query: pulumi.String("string"),
},
},
},
})
var deploymentGateResource = new DeploymentGate("deploymentGateResource", DeploymentGateArgs.builder()
.env("string")
.service("string")
.dryRun(false)
.identifier("string")
.rules(DeploymentGateRuleArgs.builder()
.name("string")
.type("string")
.dryRun(false)
.id("string")
.options(DeploymentGateRuleOptionsArgs.builder()
.duration(0)
.excludedResources("string")
.query("string")
.build())
.build())
.build());
deployment_gate_resource = datadog.DeploymentGate("deploymentGateResource",
env="string",
service="string",
dry_run=False,
identifier="string",
rules=[{
"name": "string",
"type": "string",
"dry_run": False,
"id": "string",
"options": {
"duration": 0,
"excluded_resources": ["string"],
"query": "string",
},
}])
const deploymentGateResource = new datadog.DeploymentGate("deploymentGateResource", {
env: "string",
service: "string",
dryRun: false,
identifier: "string",
rules: [{
name: "string",
type: "string",
dryRun: false,
id: "string",
options: {
duration: 0,
excludedResources: ["string"],
query: "string",
},
}],
});
type: datadog:DeploymentGate
properties:
dryRun: false
env: string
identifier: string
rules:
- dryRun: false
id: string
name: string
options:
duration: 0
excludedResources:
- string
query: string
type: string
service: string
DeploymentGate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The DeploymentGate resource accepts the following input properties:
- Env string
- The target environment (example: dev).
- Service string
- The service name (example: transaction-backend).
- Dry
Run bool - Enable Dry Run to test gate behavior without impacting deployments. The evaluation of a dry run gate always responds with a pass status, but the in-app result is the real status based on rules evaluation. This is particularly useful when performing an initial evaluation of the gate behavior without impacting the deployment pipeline.
- Identifier string
- Unique name for multiple gates on the same service/environment.
- Rules
List<Deployment
Gate Rule> - Deployment rules for this gate.
- Env string
- The target environment (example: dev).
- Service string
- The service name (example: transaction-backend).
- Dry
Run bool - Enable Dry Run to test gate behavior without impacting deployments. The evaluation of a dry run gate always responds with a pass status, but the in-app result is the real status based on rules evaluation. This is particularly useful when performing an initial evaluation of the gate behavior without impacting the deployment pipeline.
- Identifier string
- Unique name for multiple gates on the same service/environment.
- Rules
[]Deployment
Gate Rule Args - Deployment rules for this gate.
- env String
- The target environment (example: dev).
- service String
- The service name (example: transaction-backend).
- dry
Run Boolean - Enable Dry Run to test gate behavior without impacting deployments. The evaluation of a dry run gate always responds with a pass status, but the in-app result is the real status based on rules evaluation. This is particularly useful when performing an initial evaluation of the gate behavior without impacting the deployment pipeline.
- identifier String
- Unique name for multiple gates on the same service/environment.
- rules
List<Deployment
Gate Rule> - Deployment rules for this gate.
- env string
- The target environment (example: dev).
- service string
- The service name (example: transaction-backend).
- dry
Run boolean - Enable Dry Run to test gate behavior without impacting deployments. The evaluation of a dry run gate always responds with a pass status, but the in-app result is the real status based on rules evaluation. This is particularly useful when performing an initial evaluation of the gate behavior without impacting the deployment pipeline.
- identifier string
- Unique name for multiple gates on the same service/environment.
- rules
Deployment
Gate Rule[] - Deployment rules for this gate.
- env str
- The target environment (example: dev).
- service str
- The service name (example: transaction-backend).
- dry_
run bool - Enable Dry Run to test gate behavior without impacting deployments. The evaluation of a dry run gate always responds with a pass status, but the in-app result is the real status based on rules evaluation. This is particularly useful when performing an initial evaluation of the gate behavior without impacting the deployment pipeline.
- identifier str
- Unique name for multiple gates on the same service/environment.
- rules
Sequence[Deployment
Gate Rule Args] - Deployment rules for this gate.
- env String
- The target environment (example: dev).
- service String
- The service name (example: transaction-backend).
- dry
Run Boolean - Enable Dry Run to test gate behavior without impacting deployments. The evaluation of a dry run gate always responds with a pass status, but the in-app result is the real status based on rules evaluation. This is particularly useful when performing an initial evaluation of the gate behavior without impacting the deployment pipeline.
- identifier String
- Unique name for multiple gates on the same service/environment.
- rules List<Property Map>
- Deployment rules for this gate.
Outputs
All input properties are implicitly available as output properties. Additionally, the DeploymentGate resource produces the following output properties:
- created_
at str - Creation timestamp of the deployment gate.
- id str
- The provider-assigned unique ID for this managed resource.
- updated_
at str - Last update timestamp of the deployment gate.
Look up Existing DeploymentGate Resource
Get an existing DeploymentGate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: DeploymentGateState, opts?: CustomResourceOptions): DeploymentGate@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
dry_run: Optional[bool] = None,
env: Optional[str] = None,
identifier: Optional[str] = None,
rules: Optional[Sequence[DeploymentGateRuleArgs]] = None,
service: Optional[str] = None,
updated_at: Optional[str] = None) -> DeploymentGatefunc GetDeploymentGate(ctx *Context, name string, id IDInput, state *DeploymentGateState, opts ...ResourceOption) (*DeploymentGate, error)public static DeploymentGate Get(string name, Input<string> id, DeploymentGateState? state, CustomResourceOptions? opts = null)public static DeploymentGate get(String name, Output<String> id, DeploymentGateState state, CustomResourceOptions options)resources: _: type: datadog:DeploymentGate get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Created
At string - Creation timestamp of the deployment gate.
- Dry
Run bool - Enable Dry Run to test gate behavior without impacting deployments. The evaluation of a dry run gate always responds with a pass status, but the in-app result is the real status based on rules evaluation. This is particularly useful when performing an initial evaluation of the gate behavior without impacting the deployment pipeline.
- Env string
- The target environment (example: dev).
- Identifier string
- Unique name for multiple gates on the same service/environment.
- Rules
List<Deployment
Gate Rule> - Deployment rules for this gate.
- Service string
- The service name (example: transaction-backend).
- Updated
At string - Last update timestamp of the deployment gate.
- Created
At string - Creation timestamp of the deployment gate.
- Dry
Run bool - Enable Dry Run to test gate behavior without impacting deployments. The evaluation of a dry run gate always responds with a pass status, but the in-app result is the real status based on rules evaluation. This is particularly useful when performing an initial evaluation of the gate behavior without impacting the deployment pipeline.
- Env string
- The target environment (example: dev).
- Identifier string
- Unique name for multiple gates on the same service/environment.
- Rules
[]Deployment
Gate Rule Args - Deployment rules for this gate.
- Service string
- The service name (example: transaction-backend).
- Updated
At string - Last update timestamp of the deployment gate.
- created
At String - Creation timestamp of the deployment gate.
- dry
Run Boolean - Enable Dry Run to test gate behavior without impacting deployments. The evaluation of a dry run gate always responds with a pass status, but the in-app result is the real status based on rules evaluation. This is particularly useful when performing an initial evaluation of the gate behavior without impacting the deployment pipeline.
- env String
- The target environment (example: dev).
- identifier String
- Unique name for multiple gates on the same service/environment.
- rules
List<Deployment
Gate Rule> - Deployment rules for this gate.
- service String
- The service name (example: transaction-backend).
- updated
At String - Last update timestamp of the deployment gate.
- created
At string - Creation timestamp of the deployment gate.
- dry
Run boolean - Enable Dry Run to test gate behavior without impacting deployments. The evaluation of a dry run gate always responds with a pass status, but the in-app result is the real status based on rules evaluation. This is particularly useful when performing an initial evaluation of the gate behavior without impacting the deployment pipeline.
- env string
- The target environment (example: dev).
- identifier string
- Unique name for multiple gates on the same service/environment.
- rules
Deployment
Gate Rule[] - Deployment rules for this gate.
- service string
- The service name (example: transaction-backend).
- updated
At string - Last update timestamp of the deployment gate.
- created_
at str - Creation timestamp of the deployment gate.
- dry_
run bool - Enable Dry Run to test gate behavior without impacting deployments. The evaluation of a dry run gate always responds with a pass status, but the in-app result is the real status based on rules evaluation. This is particularly useful when performing an initial evaluation of the gate behavior without impacting the deployment pipeline.
- env str
- The target environment (example: dev).
- identifier str
- Unique name for multiple gates on the same service/environment.
- rules
Sequence[Deployment
Gate Rule Args] - Deployment rules for this gate.
- service str
- The service name (example: transaction-backend).
- updated_
at str - Last update timestamp of the deployment gate.
- created
At String - Creation timestamp of the deployment gate.
- dry
Run Boolean - Enable Dry Run to test gate behavior without impacting deployments. The evaluation of a dry run gate always responds with a pass status, but the in-app result is the real status based on rules evaluation. This is particularly useful when performing an initial evaluation of the gate behavior without impacting the deployment pipeline.
- env String
- The target environment (example: dev).
- identifier String
- Unique name for multiple gates on the same service/environment.
- rules List<Property Map>
- Deployment rules for this gate.
- service String
- The service name (example: transaction-backend).
- updated
At String - Last update timestamp of the deployment gate.
Supporting Types
DeploymentGateRule, DeploymentGateRuleArgs
DeploymentGateRuleOptions, DeploymentGateRuleOptionsArgs
- Duration int
- The duration for the rule.
- Excluded
Resources List<string> - Resources to exclude from faulty deployment detection.
- Query string
- The query for monitor rules.
- Duration int
- The duration for the rule.
- Excluded
Resources []string - Resources to exclude from faulty deployment detection.
- Query string
- The query for monitor rules.
- duration Integer
- The duration for the rule.
- excluded
Resources List<String> - Resources to exclude from faulty deployment detection.
- query String
- The query for monitor rules.
- duration number
- The duration for the rule.
- excluded
Resources string[] - Resources to exclude from faulty deployment detection.
- query string
- The query for monitor rules.
- duration int
- The duration for the rule.
- excluded_
resources Sequence[str] - Resources to exclude from faulty deployment detection.
- query str
- The query for monitor rules.
- duration Number
- The duration for the rule.
- excluded
Resources List<String> - Resources to exclude from faulty deployment detection.
- query String
- The query for monitor rules.
Import
The pulumi import command can be used, for example:
$ pulumi import datadog:index/deploymentGate:DeploymentGate new_list ""
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Datadog pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadogTerraform Provider.
