oci_devops_trigger

This resource provides the Trigger resource in Oracle Cloud Infrastructure Devops service.

Creates a new trigger.

Example Usage

resource "oci_devops_trigger" "test_trigger" {
    #Required
    actions {
        #Required
        build_pipeline_id = oci_devops_build_pipeline.test_build_pipeline.id
        type = var.trigger_actions_type

        #Optional
        filter {
            #Required
            trigger_source = var.trigger_actions_filter_trigger_source

            #Optional
            events = var.trigger_actions_filter_events
            include {

                #Optional
                base_ref = var.trigger_actions_filter_include_base_ref
                head_ref = var.trigger_actions_filter_include_head_ref
                repository_name = oci_devops_repository.test_repository.name
            }
        }
    }
    project_id = oci_devops_project.test_project.id
    trigger_source = var.trigger_trigger_source

    #Optional
    defined_tags = {"foo-namespace.bar-key"= "value"}
    description = var.trigger_description
    display_name = var.trigger_display_name
    freeform_tags = {"bar-key"= "value"}
    repository_id = oci_artifacts_repository.test_repository.id
}

Argument Reference

The following arguments are supported:

* IMPORTANT * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Trigger * update - (Defaults to 20 minutes), when updating the Trigger * delete - (Defaults to 20 minutes), when destroying the Trigger

Import

Triggers can be imported using the id, e.g.

$ terraform import oci_devops_trigger.test_trigger "id"