google_clouddeploy_custom_target_type

A Cloud Deploy CustomTargetType defines a type of custom target that can be referenced in a Cloud Deploy Target in order to facilitate deploying to other systems besides the supported runtimes.

To get more information about CustomTargetType, see:

Open in Cloud Shell

Example Usage - Clouddeploy Custom Target Type Basic

resource "google_clouddeploy_custom_target_type" "custom-target-type" {
    location = "us-central1"
    name = "my-custom-target-type"
    description = "My custom target type"
    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"
    }
    custom_actions {
      render_action = "renderAction"
      deploy_action = "deployAction"
    }
}
Open in Cloud Shell

Example Usage - Clouddeploy Custom Target Type Git Skaffold Modules

resource "google_clouddeploy_custom_target_type" "custom-target-type" {
    location = "us-central1"
    name = "my-custom-target-type"
    description = "My custom target type"
    custom_actions {
      render_action = "renderAction"
      deploy_action = "deployAction"
      include_skaffold_modules {
        configs = ["my-config"]
        git {
            repo = "http://github.com/example/example-repo.git"
            path = "configs/skaffold.yaml"
            ref = "main"
        }
      }
    }
}
Open in Cloud Shell

Example Usage - Clouddeploy Custom Target Type Gcs Skaffold Modules

resource "google_clouddeploy_custom_target_type" "custom-target-type" {
    location = "us-central1"
    name = "my-custom-target-type"
    description = "My custom target type"
    custom_actions {
      render_action = "renderAction"
      deploy_action = "deployAction"
      include_skaffold_modules {
        configs = ["my-config"]
        google_cloud_storage {
            source = "gs://example-bucket/dir/configs/*"
            path = "skaffold.yaml"
        }
      }
    }
}

Argument Reference

The following arguments are supported:


The custom_actions block supports:

The include_skaffold_modules block supports:

The git block supports:

The google_cloud_storage 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

CustomTargetType can be imported using any of these accepted formats:

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

import {
  id = "projects/{{project}}/locations/{{location}}/customTargetTypes/{{name}}"
  to = google_clouddeploy_custom_target_type.default
}

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

$ terraform import google_clouddeploy_custom_target_type.default projects/{{project}}/locations/{{location}}/customTargetTypes/{{name}}
$ terraform import google_clouddeploy_custom_target_type.default {{project}}/{{location}}/{{name}}
$ terraform import google_clouddeploy_custom_target_type.default {{location}}/{{name}}

User Project Overrides

This resource supports User Project Overrides.