octopusdeploy.ProjectDeploymentTargetTrigger
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as octopusdeploy from "@pulumi/octopusdeploy";
const example = new octopusdeploy.ProjectDeploymentTargetTrigger("example", {
eventCategories: ["MachineUnhealthy"],
projectId: "Projects-123",
});
import pulumi
import pulumi_octopusdeploy as octopusdeploy
example = octopusdeploy.ProjectDeploymentTargetTrigger("example",
event_categories=["MachineUnhealthy"],
project_id="Projects-123")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/octopusdeploy/octopusdeploy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := octopusdeploy.NewProjectDeploymentTargetTrigger(ctx, "example", &octopusdeploy.ProjectDeploymentTargetTriggerArgs{
EventCategories: pulumi.StringArray{
pulumi.String("MachineUnhealthy"),
},
ProjectId: pulumi.String("Projects-123"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Octopusdeploy = Pulumi.Octopusdeploy;
return await Deployment.RunAsync(() =>
{
var example = new Octopusdeploy.ProjectDeploymentTargetTrigger("example", new()
{
EventCategories = new[]
{
"MachineUnhealthy",
},
ProjectId = "Projects-123",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.octopusdeploy.ProjectDeploymentTargetTrigger;
import com.pulumi.octopusdeploy.ProjectDeploymentTargetTriggerArgs;
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) {
var example = new ProjectDeploymentTargetTrigger("example", ProjectDeploymentTargetTriggerArgs.builder()
.eventCategories("MachineUnhealthy")
.projectId("Projects-123")
.build());
}
}
resources:
example:
type: octopusdeploy:ProjectDeploymentTargetTrigger
properties:
eventCategories:
- MachineUnhealthy
projectId: Projects-123
Create ProjectDeploymentTargetTrigger Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ProjectDeploymentTargetTrigger(name: string, args: ProjectDeploymentTargetTriggerArgs, opts?: CustomResourceOptions);
@overload
def ProjectDeploymentTargetTrigger(resource_name: str,
args: ProjectDeploymentTargetTriggerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ProjectDeploymentTargetTrigger(resource_name: str,
opts: Optional[ResourceOptions] = None,
project_id: Optional[str] = None,
environment_ids: Optional[Sequence[str]] = None,
event_categories: Optional[Sequence[str]] = None,
event_groups: Optional[Sequence[str]] = None,
name: Optional[str] = None,
project_deployment_target_trigger_id: Optional[str] = None,
roles: Optional[Sequence[str]] = None,
should_redeploy: Optional[bool] = None)
func NewProjectDeploymentTargetTrigger(ctx *Context, name string, args ProjectDeploymentTargetTriggerArgs, opts ...ResourceOption) (*ProjectDeploymentTargetTrigger, error)
public ProjectDeploymentTargetTrigger(string name, ProjectDeploymentTargetTriggerArgs args, CustomResourceOptions? opts = null)
public ProjectDeploymentTargetTrigger(String name, ProjectDeploymentTargetTriggerArgs args)
public ProjectDeploymentTargetTrigger(String name, ProjectDeploymentTargetTriggerArgs args, CustomResourceOptions options)
type: octopusdeploy:ProjectDeploymentTargetTrigger
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 ProjectDeploymentTargetTriggerArgs
- 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 ProjectDeploymentTargetTriggerArgs
- 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 ProjectDeploymentTargetTriggerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ProjectDeploymentTargetTriggerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ProjectDeploymentTargetTriggerArgs
- 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 projectDeploymentTargetTriggerResource = new Octopusdeploy.ProjectDeploymentTargetTrigger("projectDeploymentTargetTriggerResource", new()
{
ProjectId = "string",
EnvironmentIds = new[]
{
"string",
},
EventCategories = new[]
{
"string",
},
EventGroups = new[]
{
"string",
},
Name = "string",
ProjectDeploymentTargetTriggerId = "string",
Roles = new[]
{
"string",
},
ShouldRedeploy = false,
});
example, err := octopusdeploy.NewProjectDeploymentTargetTrigger(ctx, "projectDeploymentTargetTriggerResource", &octopusdeploy.ProjectDeploymentTargetTriggerArgs{
ProjectId: pulumi.String("string"),
EnvironmentIds: pulumi.StringArray{
pulumi.String("string"),
},
EventCategories: pulumi.StringArray{
pulumi.String("string"),
},
EventGroups: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
ProjectDeploymentTargetTriggerId: pulumi.String("string"),
Roles: pulumi.StringArray{
pulumi.String("string"),
},
ShouldRedeploy: pulumi.Bool(false),
})
var projectDeploymentTargetTriggerResource = new ProjectDeploymentTargetTrigger("projectDeploymentTargetTriggerResource", ProjectDeploymentTargetTriggerArgs.builder()
.projectId("string")
.environmentIds("string")
.eventCategories("string")
.eventGroups("string")
.name("string")
.projectDeploymentTargetTriggerId("string")
.roles("string")
.shouldRedeploy(false)
.build());
project_deployment_target_trigger_resource = octopusdeploy.ProjectDeploymentTargetTrigger("projectDeploymentTargetTriggerResource",
project_id="string",
environment_ids=["string"],
event_categories=["string"],
event_groups=["string"],
name="string",
project_deployment_target_trigger_id="string",
roles=["string"],
should_redeploy=False)
const projectDeploymentTargetTriggerResource = new octopusdeploy.ProjectDeploymentTargetTrigger("projectDeploymentTargetTriggerResource", {
projectId: "string",
environmentIds: ["string"],
eventCategories: ["string"],
eventGroups: ["string"],
name: "string",
projectDeploymentTargetTriggerId: "string",
roles: ["string"],
shouldRedeploy: false,
});
type: octopusdeploy:ProjectDeploymentTargetTrigger
properties:
environmentIds:
- string
eventCategories:
- string
eventGroups:
- string
name: string
projectDeploymentTargetTriggerId: string
projectId: string
roles:
- string
shouldRedeploy: false
ProjectDeploymentTargetTrigger 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 ProjectDeploymentTargetTrigger resource accepts the following input properties:
- Project
Id string - The ID of the project to attach the trigger.
- Environment
Ids List<string> - Apply environment id filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Event
Categories List<string> - Apply event category filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Event
Groups List<string> - Apply event group filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Name string
- The name of this resource.
- Project
Deployment stringTarget Trigger Id - The ID of this resource.
- Roles List<string>
- Apply event role filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Should
Redeploy bool - Enable to re-deploy to the deployment targets even if they are already up-to-date with the current deployment.
- Project
Id string - The ID of the project to attach the trigger.
- Environment
Ids []string - Apply environment id filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Event
Categories []string - Apply event category filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Event
Groups []string - Apply event group filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Name string
- The name of this resource.
- Project
Deployment stringTarget Trigger Id - The ID of this resource.
- Roles []string
- Apply event role filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Should
Redeploy bool - Enable to re-deploy to the deployment targets even if they are already up-to-date with the current deployment.
- project
Id String - The ID of the project to attach the trigger.
- environment
Ids List<String> - Apply environment id filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event
Categories List<String> - Apply event category filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event
Groups List<String> - Apply event group filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- name String
- The name of this resource.
- project
Deployment StringTarget Trigger Id - The ID of this resource.
- roles List<String>
- Apply event role filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- should
Redeploy Boolean - Enable to re-deploy to the deployment targets even if they are already up-to-date with the current deployment.
- project
Id string - The ID of the project to attach the trigger.
- environment
Ids string[] - Apply environment id filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event
Categories string[] - Apply event category filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event
Groups string[] - Apply event group filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- name string
- The name of this resource.
- project
Deployment stringTarget Trigger Id - The ID of this resource.
- roles string[]
- Apply event role filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- should
Redeploy boolean - Enable to re-deploy to the deployment targets even if they are already up-to-date with the current deployment.
- project_
id str - The ID of the project to attach the trigger.
- environment_
ids Sequence[str] - Apply environment id filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event_
categories Sequence[str] - Apply event category filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event_
groups Sequence[str] - Apply event group filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- name str
- The name of this resource.
- project_
deployment_ strtarget_ trigger_ id - The ID of this resource.
- roles Sequence[str]
- Apply event role filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- should_
redeploy bool - Enable to re-deploy to the deployment targets even if they are already up-to-date with the current deployment.
- project
Id String - The ID of the project to attach the trigger.
- environment
Ids List<String> - Apply environment id filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event
Categories List<String> - Apply event category filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event
Groups List<String> - Apply event group filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- name String
- The name of this resource.
- project
Deployment StringTarget Trigger Id - The ID of this resource.
- roles List<String>
- Apply event role filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- should
Redeploy Boolean - Enable to re-deploy to the deployment targets even if they are already up-to-date with the current deployment.
Outputs
All input properties are implicitly available as output properties. Additionally, the ProjectDeploymentTargetTrigger resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ProjectDeploymentTargetTrigger Resource
Get an existing ProjectDeploymentTargetTrigger 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?: ProjectDeploymentTargetTriggerState, opts?: CustomResourceOptions): ProjectDeploymentTargetTrigger
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
environment_ids: Optional[Sequence[str]] = None,
event_categories: Optional[Sequence[str]] = None,
event_groups: Optional[Sequence[str]] = None,
name: Optional[str] = None,
project_deployment_target_trigger_id: Optional[str] = None,
project_id: Optional[str] = None,
roles: Optional[Sequence[str]] = None,
should_redeploy: Optional[bool] = None) -> ProjectDeploymentTargetTrigger
func GetProjectDeploymentTargetTrigger(ctx *Context, name string, id IDInput, state *ProjectDeploymentTargetTriggerState, opts ...ResourceOption) (*ProjectDeploymentTargetTrigger, error)
public static ProjectDeploymentTargetTrigger Get(string name, Input<string> id, ProjectDeploymentTargetTriggerState? state, CustomResourceOptions? opts = null)
public static ProjectDeploymentTargetTrigger get(String name, Output<String> id, ProjectDeploymentTargetTriggerState state, CustomResourceOptions options)
resources: _: type: octopusdeploy:ProjectDeploymentTargetTrigger 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.
- Environment
Ids List<string> - Apply environment id filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Event
Categories List<string> - Apply event category filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Event
Groups List<string> - Apply event group filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Name string
- The name of this resource.
- Project
Deployment stringTarget Trigger Id - The ID of this resource.
- Project
Id string - The ID of the project to attach the trigger.
- Roles List<string>
- Apply event role filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Should
Redeploy bool - Enable to re-deploy to the deployment targets even if they are already up-to-date with the current deployment.
- Environment
Ids []string - Apply environment id filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Event
Categories []string - Apply event category filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Event
Groups []string - Apply event group filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Name string
- The name of this resource.
- Project
Deployment stringTarget Trigger Id - The ID of this resource.
- Project
Id string - The ID of the project to attach the trigger.
- Roles []string
- Apply event role filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- Should
Redeploy bool - Enable to re-deploy to the deployment targets even if they are already up-to-date with the current deployment.
- environment
Ids List<String> - Apply environment id filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event
Categories List<String> - Apply event category filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event
Groups List<String> - Apply event group filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- name String
- The name of this resource.
- project
Deployment StringTarget Trigger Id - The ID of this resource.
- project
Id String - The ID of the project to attach the trigger.
- roles List<String>
- Apply event role filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- should
Redeploy Boolean - Enable to re-deploy to the deployment targets even if they are already up-to-date with the current deployment.
- environment
Ids string[] - Apply environment id filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event
Categories string[] - Apply event category filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event
Groups string[] - Apply event group filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- name string
- The name of this resource.
- project
Deployment stringTarget Trigger Id - The ID of this resource.
- project
Id string - The ID of the project to attach the trigger.
- roles string[]
- Apply event role filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- should
Redeploy boolean - Enable to re-deploy to the deployment targets even if they are already up-to-date with the current deployment.
- environment_
ids Sequence[str] - Apply environment id filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event_
categories Sequence[str] - Apply event category filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event_
groups Sequence[str] - Apply event group filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- name str
- The name of this resource.
- project_
deployment_ strtarget_ trigger_ id - The ID of this resource.
- project_
id str - The ID of the project to attach the trigger.
- roles Sequence[str]
- Apply event role filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- should_
redeploy bool - Enable to re-deploy to the deployment targets even if they are already up-to-date with the current deployment.
- environment
Ids List<String> - Apply environment id filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event
Categories List<String> - Apply event category filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- event
Groups List<String> - Apply event group filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- name String
- The name of this resource.
- project
Deployment StringTarget Trigger Id - The ID of this resource.
- project
Id String - The ID of the project to attach the trigger.
- roles List<String>
- Apply event role filters to restrict which deployment targets will actually cause the trigger to fire, and consequently, which deployment targets will be automatically deployed to.
- should
Redeploy Boolean - Enable to re-deploy to the deployment targets even if they are already up-to-date with the current deployment.
Import
$ pulumi import octopusdeploy:index/projectDeploymentTargetTrigger:ProjectDeploymentTargetTrigger [options] octopusdeploy_project_deployment_target_trigger.<name> <project_deployment_target_trigger-id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- octopusdeploy octopusdeploylabs/terraform-provider-octopusdeploy
- License
- Notes
- This Pulumi package is based on the
octopusdeploy
Terraform Provider.