CustomTargetType class
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:
- API documentation
- How-to Guides
- Define and use a custom target type
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/v9/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
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "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"
}
}
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.ArrayList;
import java.util.Arrays;
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/v9/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
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "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"
}
}]
}
}
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 com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeCustomActionsIncludeSkaffoldModuleArgs;
import com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeCustomActionsIncludeSkaffoldModuleGitArgs;
import java.util.ArrayList;
import java.util.Arrays;
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/v9/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
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "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"]
"googleCloudStorage" = {
"source" = "gs://example-bucket/dir/configs/*"
"path" = "skaffold.yaml"
}
}]
}
}
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 com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeCustomActionsIncludeSkaffoldModuleArgs;
import com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeCustomActionsIncludeSkaffoldModuleGoogleCloudStorageArgs;
import java.util.ArrayList;
import java.util.Arrays;
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/v9/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
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "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"]
"googleCloudBuildRepo" = {
"repository" = "projects/example/locations/us-central1/connections/git/repositories/example-repo"
"path" = "configs/skaffold.yaml"
"ref" = "main"
}
}]
}
}
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 com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeCustomActionsIncludeSkaffoldModuleArgs;
import com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeCustomActionsIncludeSkaffoldModuleGoogleCloudBuildRepoArgs;
import java.util.ArrayList;
import java.util.Arrays;
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
Clouddeploy Custom Target Type Tasks
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",
tasks: {
render: {
container: {
image: "gcr.io/my-project/my-render-image",
},
},
deploy: {
container: {
image: "gcr.io/my-project/my-deploy-image",
},
},
},
});
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",
tasks={
"render": {
"container": {
"image": "gcr.io/my-project/my-render-image",
},
},
"deploy": {
"container": {
"image": "gcr.io/my-project/my-deploy-image",
},
},
})
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",
Tasks = new Gcp.CloudDeploy.Inputs.CustomTargetTypeTasksArgs
{
Render = new Gcp.CloudDeploy.Inputs.CustomTargetTypeTasksRenderArgs
{
Container = new Gcp.CloudDeploy.Inputs.CustomTargetTypeTasksRenderContainerArgs
{
Image = "gcr.io/my-project/my-render-image",
},
},
Deploy = new Gcp.CloudDeploy.Inputs.CustomTargetTypeTasksDeployArgs
{
Container = new Gcp.CloudDeploy.Inputs.CustomTargetTypeTasksDeployContainerArgs
{
Image = "gcr.io/my-project/my-deploy-image",
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/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"),
Tasks: &clouddeploy.CustomTargetTypeTasksArgs{
Render: &clouddeploy.CustomTargetTypeTasksRenderArgs{
Container: &clouddeploy.CustomTargetTypeTasksRenderContainerArgs{
Image: pulumi.String("gcr.io/my-project/my-render-image"),
},
},
Deploy: &clouddeploy.CustomTargetTypeTasksDeployArgs{
Container: &clouddeploy.CustomTargetTypeTasksDeployContainerArgs{
Image: pulumi.String("gcr.io/my-project/my-deploy-image"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_clouddeploy_customtargettype" "custom-target-type" {
location = "us-central1"
name = "my-custom-target-type"
description = "My custom target type"
tasks = {
render = {
container = {
image = "gcr.io/my-project/my-render-image"
}
}
deploy = {
container = {
image = "gcr.io/my-project/my-deploy-image"
}
}
}
}
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.CustomTargetTypeTasksArgs;
import com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeTasksRenderArgs;
import com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeTasksRenderContainerArgs;
import com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeTasksDeployArgs;
import com.pulumi.gcp.clouddeploy.inputs.CustomTargetTypeTasksDeployContainerArgs;
import java.util.ArrayList;
import java.util.Arrays;
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")
.tasks(CustomTargetTypeTasksArgs.builder()
.render(CustomTargetTypeTasksRenderArgs.builder()
.container(CustomTargetTypeTasksRenderContainerArgs.builder()
.image("gcr.io/my-project/my-render-image")
.build())
.build())
.deploy(CustomTargetTypeTasksDeployArgs.builder()
.container(CustomTargetTypeTasksDeployContainerArgs.builder()
.image("gcr.io/my-project/my-deploy-image")
.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
tasks:
render:
container:
image: gcr.io/my-project/my-render-image
deploy:
container:
image: gcr.io/my-project/my-deploy-image
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
- CustomTargetType(String name, {CustomTargetTypeArgs? args, CustomResourceOptions? options})
-
Creates a new CustomTargetType.
nameThe Pulumi resource name.argsArguments used to configure this CustomTargetType. The set of arguments for CustomTargetType.optionsResource options controlling this resource's behavior. - CustomTargetType.reference(String urn)
- Creates a typed reference to an existing CustomTargetType resource.
Properties
-
annotations
↔ Output<
Map< String, String> ?> -
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
effectiveAnnotationsfor all of the annotations present on the resource.latefinal -
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
createTime
↔ Output<
String> -
Time at which the
CustomTargetTypewas created.latefinal -
customActions
↔ Output<
CustomTargetTypeCustomActions?> -
Configures render and deploy for the
CustomTargetTypeusing Skaffold custom actions. Structure is documented below.latefinal -
customTargetTypeId
↔ Output<
String> -
Resource id of the
CustomTargetType.latefinal -
deletionPolicy
↔ Output<
String> -
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE.
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
latefinal
-
description
↔ Output<
String?> -
Description of the
CustomTargetType. Max length is 255 characters.latefinal -
effectiveAnnotations
↔ Output<
Map< String, String> > -
All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
latefinal
-
effectiveLabels
↔ Output<
Map< String, String> > -
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
latefinal
-
etag
↔ Output<
String> -
The weak etag of the
CustomTargetTyperesource. 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.latefinal - hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
labels
↔ Output<
Map< String, String> ?> -
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
effectiveLabelsfor all of the labels present on the resource.latefinal -
location
↔ Output<
String> -
The location of the source.
latefinal
-
name
↔ Output<
String> -
Name of the
CustomTargetType.latefinal -
project
↔ Output<
String> -
The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
latefinal
-
pulumiLabels
↔ Output<
Map< String, String> > -
The combination of labels configured directly on the resource
and default labels configured on the provider.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tasks
↔ Output<
CustomTargetTypeTasks?> -
Configures render and deploy for the
CustomTargetTypeusing tasks. Structure is documented below.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
uid
↔ Output<
String> -
Unique identifier of the
CustomTargetType.latefinal -
updateTime
↔ Output<
String> -
Time at which the
CustomTargetTypewas updated.latefinal -
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {CustomTargetTypeState? state, CustomResourceOptions? options}) → CustomTargetType -
Gets an existing CustomTargetType resource's state with the given
nameandid.