subcategory | page_title | description |
---|---|---|
Cloud Deploy |
Google: google_clouddeploy_delivery_pipeline |
The Cloud Deploy `DeliveryPipeline` resource |
The Cloud Deploy DeliveryPipeline
resource
Creates a basic Cloud Deploy delivery pipeline
resource "google_clouddeploy_delivery_pipeline" "primary" {
location = "us-west1"
name = "pipeline"
annotations = {
my_first_annotation = "example-annotation-1"
my_second_annotation = "example-annotation-2"
}
description = "basic description"
labels = {
my_first_label = "example-label-1"
my_second_label = "example-label-2"
}
project = "my-project-name"
serial_pipeline {
stages {
profiles = ["example-profile-one", "example-profile-two"]
target_id = "example-target-one"
}
stages {
profiles = []
target_id = "example-target-two"
}
}
}
tests creating and updating a delivery pipeline with deployment verification strategy
resource "google_clouddeploy_delivery_pipeline" "primary" {
location = "us-west1"
name = "pipeline"
annotations = {
my_first_annotation = "example-annotation-1"
my_second_annotation = "example-annotation-2"
}
description = "basic description"
labels = {
my_first_label = "example-label-1"
my_second_label = "example-label-2"
}
project = "my-project-name"
serial_pipeline {
stages {
profiles = ["example-profile-one", "example-profile-two"]
target_id = "example-target-one"
}
stages {
profiles = []
target_id = "example-target-two"
}
}
provider = google-beta
}
The following arguments are supported:
-
location
- (Required) The location for the resource -
name
- (Required) Name of theDeliveryPipeline
. Format is [a-z][a-z0-9-]{0,62}.
-
annotations
- (Optional) User annotations. These attributes can only be set and used by the user, and not by Google Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations. -
description
- (Optional) Description of theDeliveryPipeline
. Max length is 255 characters. -
labels
- (Optional) Labels are attributes that can be set and used by both the user and by Google Cloud Deploy. Labels must meet the following constraints: * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. * All characters must use UTF-8 encoding, and international characters are allowed. * Keys must start with a lowercase letter or international character. * Each resource is limited to a maximum of 64 labels. Both keys and values are additionally constrained to be <= 128 bytes. -
project
- (Optional) The project for the resource -
serial_pipeline
- (Optional) SerialPipeline defines a sequential set of stages for aDeliveryPipeline
. -
suspended
- (Optional) When suspended, no new releases or rollouts can be created, but in-progress ones will complete.
The serial_pipeline
block supports:
stages
- (Optional) Each stage specifies configuration for aTarget
. The ordering of this list defines the promotion flow.
The stages
block supports:
-
profiles
- (Optional) Skaffold profiles to use when rendering the manifest for this stage'sTarget
. -
strategy
- (Optional) (Beta only) Optional. The strategy to use for aRollout
to this stage. -
target_id
- (Optional) The target_id to which this stage points. This field refers exclusively to the last segment of a target name. For example, this field would just bemy-target
(rather thanprojects/project/locations/location/targets/my-target
). The location of theTarget
is inferred to be the same as the location of theDeliveryPipeline
that contains thisStage
.
The strategy
block supports:
standard
- (Optional) Standard deployment strategy executes a single deploy and allows verifying the deployment.
The standard
block supports:
verify
- (Optional) Whether to verify a deployment.
In addition to the arguments listed above, the following computed attributes are exported:
-
id
- an identifier for the resource with formatprojects/{{project}}/locations/{{location}}/deliveryPipelines/{{name}}
-
condition
- Output only. Information around the state of the Delivery Pipeline. -
create_time
- Output only. Time at which the pipeline was created. -
etag
- This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. -
uid
- Output only. Unique identifier of theDeliveryPipeline
. -
update_time
- Output only. Most recent time at which the pipeline was updated.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.
DeliveryPipeline can be imported using any of these accepted formats:
$ 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}}