CustomTargetTypeArgs

data class CustomTargetTypeArgs(val annotations: Output<Map<String, String>>? = null, val customActions: Output<CustomTargetTypeCustomActionsArgs>? = null, val description: Output<String>? = null, val labels: Output<Map<String, String>>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val project: Output<String>? = null) : ConvertibleToJava<CustomTargetTypeArgs>

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:

Example Usage

Clouddeploy Custom Target Type Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const custom_target_type = new gcp.clouddeploy.CustomTargetType("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",
},
customActions: {
renderAction: "renderAction",
deployAction: "deployAction",
},
});
import pulumi
import pulumi_gcp as gcp
custom_target_type = gcp.clouddeploy.CustomTargetType("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",
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var custom_target_type = new Gcp.CloudDeploy.CustomTargetType("custom-target-type", new()
{
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" },
},
CustomActions = new Gcp.CloudDeploy.Inputs.CustomTargetTypeCustomActionsArgs
{
RenderAction = "renderAction",
DeployAction = "deployAction",
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/clouddeploy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := clouddeploy.NewCustomTargetType(ctx, "custom-target-type", &clouddeploy.CustomTargetTypeArgs{
Location: pulumi.String("us-central1"),
Name: pulumi.String("my-custom-target-type"),
Description: pulumi.String("My custom target type"),
Annotations: pulumi.StringMap{
"my_first_annotation": pulumi.String("example-annotation-1"),
"my_second_annotation": pulumi.String("example-annotation-2"),
},
Labels: pulumi.StringMap{
"my_first_label": pulumi.String("example-label-1"),
"my_second_label": pulumi.String("example-label-2"),
},
CustomActions: &clouddeploy.CustomTargetTypeCustomActionsArgs{
RenderAction: pulumi.String("renderAction"),
DeployAction: pulumi.String("deployAction"),
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.clouddeploy.CustomTargetType;
import com.pulumi.gcp.clouddeploy.CustomTargetTypeArgs;
import com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeCustomActionsArgs;
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 custom_target_type = new CustomTargetType("custom-target-type", CustomTargetTypeArgs.builder()
.location("us-central1")
.name("my-custom-target-type")
.description("My custom target type")
.annotations(Map.ofEntries(
Map.entry("my_first_annotation", "example-annotation-1"),
Map.entry("my_second_annotation", "example-annotation-2")
))
.labels(Map.ofEntries(
Map.entry("my_first_label", "example-label-1"),
Map.entry("my_second_label", "example-label-2")
))
.customActions(CustomTargetTypeCustomActionsArgs.builder()
.renderAction("renderAction")
.deployAction("deployAction")
.build())
.build());
}
}
resources:
custom-target-type:
type: gcp:clouddeploy:CustomTargetType
properties:
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
customActions:
renderAction: renderAction
deployAction: deployAction

Clouddeploy Custom Target Type Git Skaffold Modules

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const custom_target_type = new gcp.clouddeploy.CustomTargetType("custom-target-type", {
location: "us-central1",
name: "my-custom-target-type",
description: "My custom target type",
customActions: {
renderAction: "renderAction",
deployAction: "deployAction",
includeSkaffoldModules: [{
configs: ["my-config"],
git: {
repo: "http://github.com/example/example-repo.git",
path: "configs/skaffold.yaml",
ref: "main",
},
}],
},
});
import pulumi
import pulumi_gcp as gcp
custom_target_type = gcp.clouddeploy.CustomTargetType("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",
},
}],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var custom_target_type = new Gcp.CloudDeploy.CustomTargetType("custom-target-type", new()
{
Location = "us-central1",
Name = "my-custom-target-type",
Description = "My custom target type",
CustomActions = new Gcp.CloudDeploy.Inputs.CustomTargetTypeCustomActionsArgs
{
RenderAction = "renderAction",
DeployAction = "deployAction",
IncludeSkaffoldModules = new[]
{
new Gcp.CloudDeploy.Inputs.CustomTargetTypeCustomActionsIncludeSkaffoldModuleArgs
{
Configs = new[]
{
"my-config",
},
Git = new Gcp.CloudDeploy.Inputs.CustomTargetTypeCustomActionsIncludeSkaffoldModuleGitArgs
{
Repo = "http://github.com/example/example-repo.git",
Path = "configs/skaffold.yaml",
Ref = "main",
},
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/clouddeploy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := clouddeploy.NewCustomTargetType(ctx, "custom-target-type", &clouddeploy.CustomTargetTypeArgs{
Location: pulumi.String("us-central1"),
Name: pulumi.String("my-custom-target-type"),
Description: pulumi.String("My custom target type"),
CustomActions: &clouddeploy.CustomTargetTypeCustomActionsArgs{
RenderAction: pulumi.String("renderAction"),
DeployAction: pulumi.String("deployAction"),
IncludeSkaffoldModules: clouddeploy.CustomTargetTypeCustomActionsIncludeSkaffoldModuleArray{
&clouddeploy.CustomTargetTypeCustomActionsIncludeSkaffoldModuleArgs{
Configs: pulumi.StringArray{
pulumi.String("my-config"),
},
Git: &clouddeploy.CustomTargetTypeCustomActionsIncludeSkaffoldModuleGitArgs{
Repo: pulumi.String("http://github.com/example/example-repo.git"),
Path: pulumi.String("configs/skaffold.yaml"),
Ref: pulumi.String("main"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.clouddeploy.CustomTargetType;
import com.pulumi.gcp.clouddeploy.CustomTargetTypeArgs;
import com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeCustomActionsArgs;
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 custom_target_type = new CustomTargetType("custom-target-type", CustomTargetTypeArgs.builder()
.location("us-central1")
.name("my-custom-target-type")
.description("My custom target type")
.customActions(CustomTargetTypeCustomActionsArgs.builder()
.renderAction("renderAction")
.deployAction("deployAction")
.includeSkaffoldModules(CustomTargetTypeCustomActionsIncludeSkaffoldModuleArgs.builder()
.configs("my-config")
.git(CustomTargetTypeCustomActionsIncludeSkaffoldModuleGitArgs.builder()
.repo("http://github.com/example/example-repo.git")
.path("configs/skaffold.yaml")
.ref("main")
.build())
.build())
.build())
.build());
}
}
resources:
custom-target-type:
type: gcp:clouddeploy:CustomTargetType
properties:
location: us-central1
name: my-custom-target-type
description: My custom target type
customActions:
renderAction: renderAction
deployAction: deployAction
includeSkaffoldModules:
- configs:
- my-config
git:
repo: http://github.com/example/example-repo.git
path: configs/skaffold.yaml
ref: main

Clouddeploy Custom Target Type Gcs Skaffold Modules

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const custom_target_type = new gcp.clouddeploy.CustomTargetType("custom-target-type", {
location: "us-central1",
name: "my-custom-target-type",
description: "My custom target type",
customActions: {
renderAction: "renderAction",
deployAction: "deployAction",
includeSkaffoldModules: [{
configs: ["my-config"],
googleCloudStorage: {
source: "gs://example-bucket/dir/configs/*",
path: "skaffold.yaml",
},
}],
},
});
import pulumi
import pulumi_gcp as gcp
custom_target_type = gcp.clouddeploy.CustomTargetType("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",
},
}],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var custom_target_type = new Gcp.CloudDeploy.CustomTargetType("custom-target-type", new()
{
Location = "us-central1",
Name = "my-custom-target-type",
Description = "My custom target type",
CustomActions = new Gcp.CloudDeploy.Inputs.CustomTargetTypeCustomActionsArgs
{
RenderAction = "renderAction",
DeployAction = "deployAction",
IncludeSkaffoldModules = new[]
{
new Gcp.CloudDeploy.Inputs.CustomTargetTypeCustomActionsIncludeSkaffoldModuleArgs
{
Configs = new[]
{
"my-config",
},
GoogleCloudStorage = new Gcp.CloudDeploy.Inputs.CustomTargetTypeCustomActionsIncludeSkaffoldModuleGoogleCloudStorageArgs
{
Source = "gs://example-bucket/dir/configs/*",
Path = "skaffold.yaml",
},
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/clouddeploy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := clouddeploy.NewCustomTargetType(ctx, "custom-target-type", &clouddeploy.CustomTargetTypeArgs{
Location: pulumi.String("us-central1"),
Name: pulumi.String("my-custom-target-type"),
Description: pulumi.String("My custom target type"),
CustomActions: &clouddeploy.CustomTargetTypeCustomActionsArgs{
RenderAction: pulumi.String("renderAction"),
DeployAction: pulumi.String("deployAction"),
IncludeSkaffoldModules: clouddeploy.CustomTargetTypeCustomActionsIncludeSkaffoldModuleArray{
&clouddeploy.CustomTargetTypeCustomActionsIncludeSkaffoldModuleArgs{
Configs: pulumi.StringArray{
pulumi.String("my-config"),
},
GoogleCloudStorage: &clouddeploy.CustomTargetTypeCustomActionsIncludeSkaffoldModuleGoogleCloudStorageArgs{
Source: pulumi.String("gs://example-bucket/dir/configs/*"),
Path: pulumi.String("skaffold.yaml"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.clouddeploy.CustomTargetType;
import com.pulumi.gcp.clouddeploy.CustomTargetTypeArgs;
import com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeCustomActionsArgs;
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 custom_target_type = new CustomTargetType("custom-target-type", CustomTargetTypeArgs.builder()
.location("us-central1")
.name("my-custom-target-type")
.description("My custom target type")
.customActions(CustomTargetTypeCustomActionsArgs.builder()
.renderAction("renderAction")
.deployAction("deployAction")
.includeSkaffoldModules(CustomTargetTypeCustomActionsIncludeSkaffoldModuleArgs.builder()
.configs("my-config")
.googleCloudStorage(CustomTargetTypeCustomActionsIncludeSkaffoldModuleGoogleCloudStorageArgs.builder()
.source("gs://example-bucket/dir/configs/*")
.path("skaffold.yaml")
.build())
.build())
.build())
.build());
}
}
resources:
custom-target-type:
type: gcp:clouddeploy:CustomTargetType
properties:
location: us-central1
name: my-custom-target-type
description: My custom target type
customActions:
renderAction: renderAction
deployAction: deployAction
includeSkaffoldModules:
- configs:
- my-config
googleCloudStorage:
source: gs://example-bucket/dir/configs/*
path: skaffold.yaml

Clouddeploy Custom Target Type Gcb Repo Skaffold Modules

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const custom_target_type = new gcp.clouddeploy.CustomTargetType("custom-target-type", {
location: "us-central1",
name: "my-custom-target-type",
description: "My custom target type",
customActions: {
renderAction: "renderAction",
deployAction: "deployAction",
includeSkaffoldModules: [{
configs: ["my-config"],
googleCloudBuildRepo: {
repository: "projects/example/locations/us-central1/connections/git/repositories/example-repo",
path: "configs/skaffold.yaml",
ref: "main",
},
}],
},
});
import pulumi
import pulumi_gcp as gcp
custom_target_type = gcp.clouddeploy.CustomTargetType("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_build_repo": {
"repository": "projects/example/locations/us-central1/connections/git/repositories/example-repo",
"path": "configs/skaffold.yaml",
"ref": "main",
},
}],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var custom_target_type = new Gcp.CloudDeploy.CustomTargetType("custom-target-type", new()
{
Location = "us-central1",
Name = "my-custom-target-type",
Description = "My custom target type",
CustomActions = new Gcp.CloudDeploy.Inputs.CustomTargetTypeCustomActionsArgs
{
RenderAction = "renderAction",
DeployAction = "deployAction",
IncludeSkaffoldModules = new[]
{
new Gcp.CloudDeploy.Inputs.CustomTargetTypeCustomActionsIncludeSkaffoldModuleArgs
{
Configs = new[]
{
"my-config",
},
GoogleCloudBuildRepo = new Gcp.CloudDeploy.Inputs.CustomTargetTypeCustomActionsIncludeSkaffoldModuleGoogleCloudBuildRepoArgs
{
Repository = "projects/example/locations/us-central1/connections/git/repositories/example-repo",
Path = "configs/skaffold.yaml",
Ref = "main",
},
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/clouddeploy"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := clouddeploy.NewCustomTargetType(ctx, "custom-target-type", &clouddeploy.CustomTargetTypeArgs{
Location: pulumi.String("us-central1"),
Name: pulumi.String("my-custom-target-type"),
Description: pulumi.String("My custom target type"),
CustomActions: &clouddeploy.CustomTargetTypeCustomActionsArgs{
RenderAction: pulumi.String("renderAction"),
DeployAction: pulumi.String("deployAction"),
IncludeSkaffoldModules: clouddeploy.CustomTargetTypeCustomActionsIncludeSkaffoldModuleArray{
&clouddeploy.CustomTargetTypeCustomActionsIncludeSkaffoldModuleArgs{
Configs: pulumi.StringArray{
pulumi.String("my-config"),
},
GoogleCloudBuildRepo: &clouddeploy.CustomTargetTypeCustomActionsIncludeSkaffoldModuleGoogleCloudBuildRepoArgs{
Repository: pulumi.String("projects/example/locations/us-central1/connections/git/repositories/example-repo"),
Path: pulumi.String("configs/skaffold.yaml"),
Ref: pulumi.String("main"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.clouddeploy.CustomTargetType;
import com.pulumi.gcp.clouddeploy.CustomTargetTypeArgs;
import com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeCustomActionsArgs;
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 custom_target_type = new CustomTargetType("custom-target-type", CustomTargetTypeArgs.builder()
.location("us-central1")
.name("my-custom-target-type")
.description("My custom target type")
.customActions(CustomTargetTypeCustomActionsArgs.builder()
.renderAction("renderAction")
.deployAction("deployAction")
.includeSkaffoldModules(CustomTargetTypeCustomActionsIncludeSkaffoldModuleArgs.builder()
.configs("my-config")
.googleCloudBuildRepo(CustomTargetTypeCustomActionsIncludeSkaffoldModuleGoogleCloudBuildRepoArgs.builder()
.repository("projects/example/locations/us-central1/connections/git/repositories/example-repo")
.path("configs/skaffold.yaml")
.ref("main")
.build())
.build())
.build())
.build());
}
}
resources:
custom-target-type:
type: gcp:clouddeploy:CustomTargetType
properties:
location: us-central1
name: my-custom-target-type
description: My custom target type
customActions:
renderAction: renderAction
deployAction: deployAction
includeSkaffoldModules:
- configs:
- my-config
googleCloudBuildRepo:
repository: projects/example/locations/us-central1/connections/git/repositories/example-repo
path: configs/skaffold.yaml
ref: main

Import

CustomTargetType can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/customTargetTypes/{{name}}

  • {{project}}/{{location}}/{{name}}

  • {{location}}/{{name}} When using the pulumi import command, CustomTargetType can be imported using one of the formats above. For example:

$ pulumi import gcp:clouddeploy/customTargetType:CustomTargetType default projects/{{project}}/locations/{{location}}/customTargetTypes/{{name}}
$ pulumi import gcp:clouddeploy/customTargetType:CustomTargetType default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:clouddeploy/customTargetType:CustomTargetType default {{location}}/{{name}}

Constructors

Link copied to clipboard
constructor(annotations: Output<Map<String, String>>? = null, customActions: Output<CustomTargetTypeCustomActionsArgs>? = null, description: Output<String>? = null, labels: Output<Map<String, String>>? = null, location: Output<String>? = null, name: Output<String>? = null, project: Output<String>? = null)

Properties

Link copied to clipboard
val annotations: Output<Map<String, String>>? = null

User annotations. These attributes can only be set and used by the user, and not by Cloud Deploy. See https://google.aip.dev/128#annotations for more details such as format and size limitations. 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.

Link copied to clipboard

Configures render and deploy for the CustomTargetType using Skaffold custom actions. Structure is documented below.

Link copied to clipboard
val description: Output<String>? = null

Description of the CustomTargetType. Max length is 255 characters.

Link copied to clipboard
val labels: Output<Map<String, String>>? = null

Labels are attributes that can be set and used by both the user and by 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. 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.

Link copied to clipboard
val location: Output<String>? = null

The location of the source.

Link copied to clipboard
val name: Output<String>? = null

Name of the CustomTargetType.

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used. //////

Functions

Link copied to clipboard
open override fun toJava(): CustomTargetTypeArgs