google_clouddeploy_delivery_pipeline

The Cloud Deploy DeliveryPipeline resource

Example Usage - canary_delivery_pipeline

Creates a basic Cloud Deploy delivery pipeline

resource "google_clouddeploy_delivery_pipeline" "primary" {
  location    = "us-west1"
  name        = "pipeline"
  description = "basic description"
  project     = "my-project-name"

  serial_pipeline {
    stages {
      deploy_parameters {
        values = {
          deployParameterKey = "deployParameterValue"
        }

        match_target_labels = {}
      }

      profiles  = ["example-profile-one", "example-profile-two"]
      target_id = "example-target-one"
    }

    stages {
      profiles  = []
      target_id = "example-target-two"
    }
  }

  annotations = {
    my_first_annotation = "example-annotation-1"

    my_second_annotation = "example-annotation-2"
  }

  labels = {
    my_first_label = "example-label-1"

    my_second_label = "example-label-2"
  }
  provider    = google-beta
}

Example Usage - canary_service_networking_delivery_pipeline

Creates a basic Cloud Deploy delivery pipeline

resource "google_clouddeploy_delivery_pipeline" "primary" {
  location    = "us-west1"
  name        = "pipeline"
  description = "basic description"
  project     = "my-project-name"

  serial_pipeline {
    stages {
      deploy_parameters {
        values = {
          deployParameterKey = "deployParameterValue"
        }

        match_target_labels = {}
      }

      profiles  = ["example-profile-one", "example-profile-two"]
      target_id = "example-target-one"
    }

    stages {
      profiles  = []
      target_id = "example-target-two"
    }
  }

  annotations = {
    my_first_annotation = "example-annotation-1"

    my_second_annotation = "example-annotation-2"
  }

  labels = {
    my_first_label = "example-label-1"

    my_second_label = "example-label-2"
  }
  provider    = google-beta
}

Example Usage - canaryrun_delivery_pipeline

Creates a basic Cloud Deploy delivery pipeline

resource "google_clouddeploy_delivery_pipeline" "primary" {
  location    = "us-west1"
  name        = "pipeline"
  description = "basic description"
  project     = "my-project-name"

  serial_pipeline {
    stages {
      deploy_parameters {
        values = {
          deployParameterKey = "deployParameterValue"
        }

        match_target_labels = {}
      }

      profiles  = ["example-profile-one", "example-profile-two"]
      target_id = "example-target-one"
    }

    stages {
      profiles  = []
      target_id = "example-target-two"
    }
  }

  annotations = {
    my_first_annotation = "example-annotation-1"

    my_second_annotation = "example-annotation-2"
  }

  labels = {
    my_first_label = "example-label-1"

    my_second_label = "example-label-2"
  }
  provider    = google-beta
}

Example Usage - delivery_pipeline

Creates a basic Cloud Deploy delivery pipeline

resource "google_clouddeploy_delivery_pipeline" "primary" {
  location    = "us-west1"
  name        = "pipeline"
  description = "basic description"
  project     = "my-project-name"

  serial_pipeline {
    stages {
      deploy_parameters {
        values = {
          deployParameterKey = "deployParameterValue"
        }

        match_target_labels = {}
      }

      profiles  = ["example-profile-one", "example-profile-two"]
      target_id = "example-target-one"
    }

    stages {
      profiles  = []
      target_id = "example-target-two"
    }
  }

  annotations = {
    my_first_annotation = "example-annotation-1"

    my_second_annotation = "example-annotation-2"
  }

  labels = {
    my_first_label = "example-label-1"

    my_second_label = "example-label-2"
  }
}

Example Usage - verify_delivery_pipeline

tests creating and updating a delivery pipeline with deployment verification strategy

resource "google_clouddeploy_delivery_pipeline" "primary" {
  location    = "us-west1"
  name        = "pipeline"
  description = "basic description"
  project     = "my-project-name"

  serial_pipeline {
    stages {
      deploy_parameters {
        values = {
          deployParameterKey = "deployParameterValue"
        }

        match_target_labels = {}
      }

      profiles  = ["example-profile-one", "example-profile-two"]
      target_id = "example-target-one"
    }

    stages {
      profiles  = []
      target_id = "example-target-two"
    }
  }

  annotations = {
    my_first_annotation = "example-annotation-1"

    my_second_annotation = "example-annotation-2"
  }

  labels = {
    my_first_label = "example-label-1"

    my_second_label = "example-label-2"
  }
  provider    = google-beta
}

Argument Reference

The following arguments are supported:

The phase_configs block supports:


Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field effective_annotations for all of the annotations present on the resource.

Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

The serial_pipeline block supports:

The stages block supports:

The deploy_parameters block supports:

The strategy block supports:

The canary block supports:

The canary_deployment block supports:

The postdeploy block supports:

The predeploy block supports:

The custom_canary_deployment block supports:

The postdeploy block supports:

The predeploy block supports:

The runtime_config block supports:

The cloud_run block supports:

The kubernetes block supports:

The gateway_service_mesh block supports:

The service_networking block supports:

The standard block supports:

The postdeploy block supports:

The predeploy block supports:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

DeliveryPipeline can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import DeliveryPipeline using one of the formats above. For example:

import {
  id = "projects/{{project}}/locations/{{location}}/deliveryPipelines/{{name}}"
  to = google_clouddeploy_delivery_pipeline.default
}

When using the terraform import command, DeliveryPipeline can be imported using one of the formats above. For example:

$ terraform import google_clouddeploy_delivery_pipeline.default projects/{{project}}/locations/{{location}}/deliveryPipelines/{{name}}
$ terraform import google_clouddeploy_delivery_pipeline.default {{project}}/{{location}}/{{name}}
$ terraform import google_clouddeploy_delivery_pipeline.default {{location}}/{{name}}