gcp.cloudbuild.WorkerPool
Explore with Pulumi AI
Definition of custom Cloud Build WorkerPools for running jobs with custom configuration and custom networking.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const pool = new gcp.cloudbuild.WorkerPool("pool", {
name: "my-pool",
location: "europe-west1",
workerConfig: {
diskSizeGb: 100,
machineType: "e2-standard-4",
noExternalIp: false,
},
});
import pulumi
import pulumi_gcp as gcp
pool = gcp.cloudbuild.WorkerPool("pool",
name="my-pool",
location="europe-west1",
worker_config={
"disk_size_gb": 100,
"machine_type": "e2-standard-4",
"no_external_ip": False,
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudbuild.NewWorkerPool(ctx, "pool", &cloudbuild.WorkerPoolArgs{
Name: pulumi.String("my-pool"),
Location: pulumi.String("europe-west1"),
WorkerConfig: &cloudbuild.WorkerPoolWorkerConfigArgs{
DiskSizeGb: pulumi.Int(100),
MachineType: pulumi.String("e2-standard-4"),
NoExternalIp: pulumi.Bool(false),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var pool = new Gcp.CloudBuild.WorkerPool("pool", new()
{
Name = "my-pool",
Location = "europe-west1",
WorkerConfig = new Gcp.CloudBuild.Inputs.WorkerPoolWorkerConfigArgs
{
DiskSizeGb = 100,
MachineType = "e2-standard-4",
NoExternalIp = false,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudbuild.WorkerPool;
import com.pulumi.gcp.cloudbuild.WorkerPoolArgs;
import com.pulumi.gcp.cloudbuild.inputs.WorkerPoolWorkerConfigArgs;
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 pool = new WorkerPool("pool", WorkerPoolArgs.builder()
.name("my-pool")
.location("europe-west1")
.workerConfig(WorkerPoolWorkerConfigArgs.builder()
.diskSizeGb(100)
.machineType("e2-standard-4")
.noExternalIp(false)
.build())
.build());
}
}
resources:
pool:
type: gcp:cloudbuild:WorkerPool
properties:
name: my-pool
location: europe-west1
workerConfig:
diskSizeGb: 100
machineType: e2-standard-4
noExternalIp: false
Network Config
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const servicenetworking = new gcp.projects.Service("servicenetworking", {
service: "servicenetworking.googleapis.com",
disableOnDestroy: false,
});
const network = new gcp.compute.Network("network", {
name: "my-network",
autoCreateSubnetworks: false,
}, {
dependsOn: [servicenetworking],
});
const workerRange = new gcp.compute.GlobalAddress("worker_range", {
name: "worker-pool-range",
purpose: "VPC_PEERING",
addressType: "INTERNAL",
prefixLength: 16,
network: network.id,
});
const workerPoolConn = new gcp.servicenetworking.Connection("worker_pool_conn", {
network: network.id,
service: "servicenetworking.googleapis.com",
reservedPeeringRanges: [workerRange.name],
}, {
dependsOn: [servicenetworking],
});
const pool = new gcp.cloudbuild.WorkerPool("pool", {
name: "my-pool",
location: "europe-west1",
workerConfig: {
diskSizeGb: 100,
machineType: "e2-standard-4",
noExternalIp: false,
},
networkConfig: {
peeredNetwork: network.id,
peeredNetworkIpRange: "/29",
},
}, {
dependsOn: [workerPoolConn],
});
import pulumi
import pulumi_gcp as gcp
servicenetworking = gcp.projects.Service("servicenetworking",
service="servicenetworking.googleapis.com",
disable_on_destroy=False)
network = gcp.compute.Network("network",
name="my-network",
auto_create_subnetworks=False,
opts = pulumi.ResourceOptions(depends_on=[servicenetworking]))
worker_range = gcp.compute.GlobalAddress("worker_range",
name="worker-pool-range",
purpose="VPC_PEERING",
address_type="INTERNAL",
prefix_length=16,
network=network.id)
worker_pool_conn = gcp.servicenetworking.Connection("worker_pool_conn",
network=network.id,
service="servicenetworking.googleapis.com",
reserved_peering_ranges=[worker_range.name],
opts = pulumi.ResourceOptions(depends_on=[servicenetworking]))
pool = gcp.cloudbuild.WorkerPool("pool",
name="my-pool",
location="europe-west1",
worker_config={
"disk_size_gb": 100,
"machine_type": "e2-standard-4",
"no_external_ip": False,
},
network_config={
"peered_network": network.id,
"peered_network_ip_range": "/29",
},
opts = pulumi.ResourceOptions(depends_on=[worker_pool_conn]))
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/cloudbuild"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/projects"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/servicenetworking"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
servicenetworking, err := projects.NewService(ctx, "servicenetworking", &projects.ServiceArgs{
Service: pulumi.String("servicenetworking.googleapis.com"),
DisableOnDestroy: pulumi.Bool(false),
})
if err != nil {
return err
}
network, err := compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
Name: pulumi.String("my-network"),
AutoCreateSubnetworks: pulumi.Bool(false),
}, pulumi.DependsOn([]pulumi.Resource{
servicenetworking,
}))
if err != nil {
return err
}
workerRange, err := compute.NewGlobalAddress(ctx, "worker_range", &compute.GlobalAddressArgs{
Name: pulumi.String("worker-pool-range"),
Purpose: pulumi.String("VPC_PEERING"),
AddressType: pulumi.String("INTERNAL"),
PrefixLength: pulumi.Int(16),
Network: network.ID(),
})
if err != nil {
return err
}
workerPoolConn, err := servicenetworking.NewConnection(ctx, "worker_pool_conn", &servicenetworking.ConnectionArgs{
Network: network.ID(),
Service: pulumi.String("servicenetworking.googleapis.com"),
ReservedPeeringRanges: pulumi.StringArray{
workerRange.Name,
},
}, pulumi.DependsOn([]pulumi.Resource{
servicenetworking,
}))
if err != nil {
return err
}
_, err = cloudbuild.NewWorkerPool(ctx, "pool", &cloudbuild.WorkerPoolArgs{
Name: pulumi.String("my-pool"),
Location: pulumi.String("europe-west1"),
WorkerConfig: &cloudbuild.WorkerPoolWorkerConfigArgs{
DiskSizeGb: pulumi.Int(100),
MachineType: pulumi.String("e2-standard-4"),
NoExternalIp: pulumi.Bool(false),
},
NetworkConfig: &cloudbuild.WorkerPoolNetworkConfigArgs{
PeeredNetwork: network.ID(),
PeeredNetworkIpRange: pulumi.String("/29"),
},
}, pulumi.DependsOn([]pulumi.Resource{
workerPoolConn,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var servicenetworking = new Gcp.Projects.Service("servicenetworking", new()
{
ServiceName = "servicenetworking.googleapis.com",
DisableOnDestroy = false,
});
var network = new Gcp.Compute.Network("network", new()
{
Name = "my-network",
AutoCreateSubnetworks = false,
}, new CustomResourceOptions
{
DependsOn =
{
servicenetworking,
},
});
var workerRange = new Gcp.Compute.GlobalAddress("worker_range", new()
{
Name = "worker-pool-range",
Purpose = "VPC_PEERING",
AddressType = "INTERNAL",
PrefixLength = 16,
Network = network.Id,
});
var workerPoolConn = new Gcp.ServiceNetworking.Connection("worker_pool_conn", new()
{
Network = network.Id,
Service = "servicenetworking.googleapis.com",
ReservedPeeringRanges = new[]
{
workerRange.Name,
},
}, new CustomResourceOptions
{
DependsOn =
{
servicenetworking,
},
});
var pool = new Gcp.CloudBuild.WorkerPool("pool", new()
{
Name = "my-pool",
Location = "europe-west1",
WorkerConfig = new Gcp.CloudBuild.Inputs.WorkerPoolWorkerConfigArgs
{
DiskSizeGb = 100,
MachineType = "e2-standard-4",
NoExternalIp = false,
},
NetworkConfig = new Gcp.CloudBuild.Inputs.WorkerPoolNetworkConfigArgs
{
PeeredNetwork = network.Id,
PeeredNetworkIpRange = "/29",
},
}, new CustomResourceOptions
{
DependsOn =
{
workerPoolConn,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.projects.Service;
import com.pulumi.gcp.projects.ServiceArgs;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.GlobalAddress;
import com.pulumi.gcp.compute.GlobalAddressArgs;
import com.pulumi.gcp.servicenetworking.Connection;
import com.pulumi.gcp.servicenetworking.ConnectionArgs;
import com.pulumi.gcp.cloudbuild.WorkerPool;
import com.pulumi.gcp.cloudbuild.WorkerPoolArgs;
import com.pulumi.gcp.cloudbuild.inputs.WorkerPoolWorkerConfigArgs;
import com.pulumi.gcp.cloudbuild.inputs.WorkerPoolNetworkConfigArgs;
import com.pulumi.resources.CustomResourceOptions;
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 servicenetworking = new Service("servicenetworking", ServiceArgs.builder()
.service("servicenetworking.googleapis.com")
.disableOnDestroy(false)
.build());
var network = new Network("network", NetworkArgs.builder()
.name("my-network")
.autoCreateSubnetworks(false)
.build(), CustomResourceOptions.builder()
.dependsOn(servicenetworking)
.build());
var workerRange = new GlobalAddress("workerRange", GlobalAddressArgs.builder()
.name("worker-pool-range")
.purpose("VPC_PEERING")
.addressType("INTERNAL")
.prefixLength(16)
.network(network.id())
.build());
var workerPoolConn = new Connection("workerPoolConn", ConnectionArgs.builder()
.network(network.id())
.service("servicenetworking.googleapis.com")
.reservedPeeringRanges(workerRange.name())
.build(), CustomResourceOptions.builder()
.dependsOn(servicenetworking)
.build());
var pool = new WorkerPool("pool", WorkerPoolArgs.builder()
.name("my-pool")
.location("europe-west1")
.workerConfig(WorkerPoolWorkerConfigArgs.builder()
.diskSizeGb(100)
.machineType("e2-standard-4")
.noExternalIp(false)
.build())
.networkConfig(WorkerPoolNetworkConfigArgs.builder()
.peeredNetwork(network.id())
.peeredNetworkIpRange("/29")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(workerPoolConn)
.build());
}
}
resources:
servicenetworking:
type: gcp:projects:Service
properties:
service: servicenetworking.googleapis.com
disableOnDestroy: false
network:
type: gcp:compute:Network
properties:
name: my-network
autoCreateSubnetworks: false
options:
dependson:
- ${servicenetworking}
workerRange:
type: gcp:compute:GlobalAddress
name: worker_range
properties:
name: worker-pool-range
purpose: VPC_PEERING
addressType: INTERNAL
prefixLength: 16
network: ${network.id}
workerPoolConn:
type: gcp:servicenetworking:Connection
name: worker_pool_conn
properties:
network: ${network.id}
service: servicenetworking.googleapis.com
reservedPeeringRanges:
- ${workerRange.name}
options:
dependson:
- ${servicenetworking}
pool:
type: gcp:cloudbuild:WorkerPool
properties:
name: my-pool
location: europe-west1
workerConfig:
diskSizeGb: 100
machineType: e2-standard-4
noExternalIp: false
networkConfig:
peeredNetwork: ${network.id}
peeredNetworkIpRange: /29
options:
dependson:
- ${workerPoolConn}
Create WorkerPool Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkerPool(name: string, args: WorkerPoolArgs, opts?: CustomResourceOptions);
@overload
def WorkerPool(resource_name: str,
args: WorkerPoolArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkerPool(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
annotations: Optional[Mapping[str, str]] = None,
display_name: Optional[str] = None,
name: Optional[str] = None,
network_config: Optional[WorkerPoolNetworkConfigArgs] = None,
project: Optional[str] = None,
worker_config: Optional[WorkerPoolWorkerConfigArgs] = None)
func NewWorkerPool(ctx *Context, name string, args WorkerPoolArgs, opts ...ResourceOption) (*WorkerPool, error)
public WorkerPool(string name, WorkerPoolArgs args, CustomResourceOptions? opts = null)
public WorkerPool(String name, WorkerPoolArgs args)
public WorkerPool(String name, WorkerPoolArgs args, CustomResourceOptions options)
type: gcp:cloudbuild:WorkerPool
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args WorkerPoolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WorkerPoolArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WorkerPoolArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkerPoolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkerPoolArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var workerPoolResource = new Gcp.CloudBuild.WorkerPool("workerPoolResource", new()
{
Location = "string",
Annotations =
{
{ "string", "string" },
},
DisplayName = "string",
Name = "string",
NetworkConfig = new Gcp.CloudBuild.Inputs.WorkerPoolNetworkConfigArgs
{
PeeredNetwork = "string",
PeeredNetworkIpRange = "string",
},
Project = "string",
WorkerConfig = new Gcp.CloudBuild.Inputs.WorkerPoolWorkerConfigArgs
{
DiskSizeGb = 0,
MachineType = "string",
NoExternalIp = false,
},
});
example, err := cloudbuild.NewWorkerPool(ctx, "workerPoolResource", &cloudbuild.WorkerPoolArgs{
Location: pulumi.String("string"),
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
DisplayName: pulumi.String("string"),
Name: pulumi.String("string"),
NetworkConfig: &cloudbuild.WorkerPoolNetworkConfigArgs{
PeeredNetwork: pulumi.String("string"),
PeeredNetworkIpRange: pulumi.String("string"),
},
Project: pulumi.String("string"),
WorkerConfig: &cloudbuild.WorkerPoolWorkerConfigArgs{
DiskSizeGb: pulumi.Int(0),
MachineType: pulumi.String("string"),
NoExternalIp: pulumi.Bool(false),
},
})
var workerPoolResource = new WorkerPool("workerPoolResource", WorkerPoolArgs.builder()
.location("string")
.annotations(Map.of("string", "string"))
.displayName("string")
.name("string")
.networkConfig(WorkerPoolNetworkConfigArgs.builder()
.peeredNetwork("string")
.peeredNetworkIpRange("string")
.build())
.project("string")
.workerConfig(WorkerPoolWorkerConfigArgs.builder()
.diskSizeGb(0)
.machineType("string")
.noExternalIp(false)
.build())
.build());
worker_pool_resource = gcp.cloudbuild.WorkerPool("workerPoolResource",
location="string",
annotations={
"string": "string",
},
display_name="string",
name="string",
network_config={
"peered_network": "string",
"peered_network_ip_range": "string",
},
project="string",
worker_config={
"disk_size_gb": 0,
"machine_type": "string",
"no_external_ip": False,
})
const workerPoolResource = new gcp.cloudbuild.WorkerPool("workerPoolResource", {
location: "string",
annotations: {
string: "string",
},
displayName: "string",
name: "string",
networkConfig: {
peeredNetwork: "string",
peeredNetworkIpRange: "string",
},
project: "string",
workerConfig: {
diskSizeGb: 0,
machineType: "string",
noExternalIp: false,
},
});
type: gcp:cloudbuild:WorkerPool
properties:
annotations:
string: string
displayName: string
location: string
name: string
networkConfig:
peeredNetwork: string
peeredNetworkIpRange: string
project: string
workerConfig:
diskSizeGb: 0
machineType: string
noExternalIp: false
WorkerPool Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The WorkerPool resource accepts the following input properties:
- Location string
- The location for the resource
- Annotations Dictionary<string, string>
- User specified annotations. 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. - Display
Name string - A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters. - Name string
- User-defined name of the
WorkerPool
. - Network
Config WorkerPool Network Config - Network configuration for the
WorkerPool
. Structure is documented below. - Project string
- The project for the resource
- Worker
Config WorkerPool Worker Config - Configuration to be used for a creating workers in the
WorkerPool
. Structure is documented below.
- Location string
- The location for the resource
- Annotations map[string]string
- User specified annotations. 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. - Display
Name string - A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters. - Name string
- User-defined name of the
WorkerPool
. - Network
Config WorkerPool Network Config Args - Network configuration for the
WorkerPool
. Structure is documented below. - Project string
- The project for the resource
- Worker
Config WorkerPool Worker Config Args - Configuration to be used for a creating workers in the
WorkerPool
. Structure is documented below.
- location String
- The location for the resource
- annotations Map<String,String>
- User specified annotations. 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. - display
Name String - A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters. - name String
- User-defined name of the
WorkerPool
. - network
Config WorkerPool Network Config - Network configuration for the
WorkerPool
. Structure is documented below. - project String
- The project for the resource
- worker
Config WorkerPool Worker Config - Configuration to be used for a creating workers in the
WorkerPool
. Structure is documented below.
- location string
- The location for the resource
- annotations {[key: string]: string}
- User specified annotations. 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. - display
Name string - A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters. - name string
- User-defined name of the
WorkerPool
. - network
Config WorkerPool Network Config - Network configuration for the
WorkerPool
. Structure is documented below. - project string
- The project for the resource
- worker
Config WorkerPool Worker Config - Configuration to be used for a creating workers in the
WorkerPool
. Structure is documented below.
- location str
- The location for the resource
- annotations Mapping[str, str]
- User specified annotations. 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. - display_
name str - A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters. - name str
- User-defined name of the
WorkerPool
. - network_
config WorkerPool Network Config Args - Network configuration for the
WorkerPool
. Structure is documented below. - project str
- The project for the resource
- worker_
config WorkerPool Worker Config Args - Configuration to be used for a creating workers in the
WorkerPool
. Structure is documented below.
- location String
- The location for the resource
- annotations Map<String>
- User specified annotations. 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. - display
Name String - A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters. - name String
- User-defined name of the
WorkerPool
. - network
Config Property Map - Network configuration for the
WorkerPool
. Structure is documented below. - project String
- The project for the resource
- worker
Config Property Map - Configuration to be used for a creating workers in the
WorkerPool
. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkerPool resource produces the following output properties:
- Create
Time string - Output only. Time at which the request to create the
WorkerPool
was received. - Delete
Time string - Output only. Time at which the request to delete the
WorkerPool
was received. - Effective
Annotations Dictionary<string, string> - Id string
- The provider-assigned unique ID for this managed resource.
- State string
- Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED
- Uid string
- Output only. A unique identifier for the
WorkerPool
. - Update
Time string - Output only. Time at which the request to update the
WorkerPool
was received.
- Create
Time string - Output only. Time at which the request to create the
WorkerPool
was received. - Delete
Time string - Output only. Time at which the request to delete the
WorkerPool
was received. - Effective
Annotations map[string]string - Id string
- The provider-assigned unique ID for this managed resource.
- State string
- Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED
- Uid string
- Output only. A unique identifier for the
WorkerPool
. - Update
Time string - Output only. Time at which the request to update the
WorkerPool
was received.
- create
Time String - Output only. Time at which the request to create the
WorkerPool
was received. - delete
Time String - Output only. Time at which the request to delete the
WorkerPool
was received. - effective
Annotations Map<String,String> - id String
- The provider-assigned unique ID for this managed resource.
- state String
- Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED
- uid String
- Output only. A unique identifier for the
WorkerPool
. - update
Time String - Output only. Time at which the request to update the
WorkerPool
was received.
- create
Time string - Output only. Time at which the request to create the
WorkerPool
was received. - delete
Time string - Output only. Time at which the request to delete the
WorkerPool
was received. - effective
Annotations {[key: string]: string} - id string
- The provider-assigned unique ID for this managed resource.
- state string
- Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED
- uid string
- Output only. A unique identifier for the
WorkerPool
. - update
Time string - Output only. Time at which the request to update the
WorkerPool
was received.
- create_
time str - Output only. Time at which the request to create the
WorkerPool
was received. - delete_
time str - Output only. Time at which the request to delete the
WorkerPool
was received. - effective_
annotations Mapping[str, str] - id str
- The provider-assigned unique ID for this managed resource.
- state str
- Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED
- uid str
- Output only. A unique identifier for the
WorkerPool
. - update_
time str - Output only. Time at which the request to update the
WorkerPool
was received.
- create
Time String - Output only. Time at which the request to create the
WorkerPool
was received. - delete
Time String - Output only. Time at which the request to delete the
WorkerPool
was received. - effective
Annotations Map<String> - id String
- The provider-assigned unique ID for this managed resource.
- state String
- Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED
- uid String
- Output only. A unique identifier for the
WorkerPool
. - update
Time String - Output only. Time at which the request to update the
WorkerPool
was received.
Look up Existing WorkerPool Resource
Get an existing WorkerPool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WorkerPoolState, opts?: CustomResourceOptions): WorkerPool
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Mapping[str, str]] = None,
create_time: Optional[str] = None,
delete_time: Optional[str] = None,
display_name: Optional[str] = None,
effective_annotations: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
name: Optional[str] = None,
network_config: Optional[WorkerPoolNetworkConfigArgs] = None,
project: Optional[str] = None,
state: Optional[str] = None,
uid: Optional[str] = None,
update_time: Optional[str] = None,
worker_config: Optional[WorkerPoolWorkerConfigArgs] = None) -> WorkerPool
func GetWorkerPool(ctx *Context, name string, id IDInput, state *WorkerPoolState, opts ...ResourceOption) (*WorkerPool, error)
public static WorkerPool Get(string name, Input<string> id, WorkerPoolState? state, CustomResourceOptions? opts = null)
public static WorkerPool get(String name, Output<String> id, WorkerPoolState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Annotations Dictionary<string, string>
- User specified annotations. 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. - Create
Time string - Output only. Time at which the request to create the
WorkerPool
was received. - Delete
Time string - Output only. Time at which the request to delete the
WorkerPool
was received. - Display
Name string - A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters. - Effective
Annotations Dictionary<string, string> - Location string
- The location for the resource
- Name string
- User-defined name of the
WorkerPool
. - Network
Config WorkerPool Network Config - Network configuration for the
WorkerPool
. Structure is documented below. - Project string
- The project for the resource
- State string
- Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED
- Uid string
- Output only. A unique identifier for the
WorkerPool
. - Update
Time string - Output only. Time at which the request to update the
WorkerPool
was received. - Worker
Config WorkerPool Worker Config - Configuration to be used for a creating workers in the
WorkerPool
. Structure is documented below.
- Annotations map[string]string
- User specified annotations. 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. - Create
Time string - Output only. Time at which the request to create the
WorkerPool
was received. - Delete
Time string - Output only. Time at which the request to delete the
WorkerPool
was received. - Display
Name string - A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters. - Effective
Annotations map[string]string - Location string
- The location for the resource
- Name string
- User-defined name of the
WorkerPool
. - Network
Config WorkerPool Network Config Args - Network configuration for the
WorkerPool
. Structure is documented below. - Project string
- The project for the resource
- State string
- Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED
- Uid string
- Output only. A unique identifier for the
WorkerPool
. - Update
Time string - Output only. Time at which the request to update the
WorkerPool
was received. - Worker
Config WorkerPool Worker Config Args - Configuration to be used for a creating workers in the
WorkerPool
. Structure is documented below.
- annotations Map<String,String>
- User specified annotations. 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. - create
Time String - Output only. Time at which the request to create the
WorkerPool
was received. - delete
Time String - Output only. Time at which the request to delete the
WorkerPool
was received. - display
Name String - A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters. - effective
Annotations Map<String,String> - location String
- The location for the resource
- name String
- User-defined name of the
WorkerPool
. - network
Config WorkerPool Network Config - Network configuration for the
WorkerPool
. Structure is documented below. - project String
- The project for the resource
- state String
- Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED
- uid String
- Output only. A unique identifier for the
WorkerPool
. - update
Time String - Output only. Time at which the request to update the
WorkerPool
was received. - worker
Config WorkerPool Worker Config - Configuration to be used for a creating workers in the
WorkerPool
. Structure is documented below.
- annotations {[key: string]: string}
- User specified annotations. 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. - create
Time string - Output only. Time at which the request to create the
WorkerPool
was received. - delete
Time string - Output only. Time at which the request to delete the
WorkerPool
was received. - display
Name string - A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters. - effective
Annotations {[key: string]: string} - location string
- The location for the resource
- name string
- User-defined name of the
WorkerPool
. - network
Config WorkerPool Network Config - Network configuration for the
WorkerPool
. Structure is documented below. - project string
- The project for the resource
- state string
- Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED
- uid string
- Output only. A unique identifier for the
WorkerPool
. - update
Time string - Output only. Time at which the request to update the
WorkerPool
was received. - worker
Config WorkerPool Worker Config - Configuration to be used for a creating workers in the
WorkerPool
. Structure is documented below.
- annotations Mapping[str, str]
- User specified annotations. 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. - create_
time str - Output only. Time at which the request to create the
WorkerPool
was received. - delete_
time str - Output only. Time at which the request to delete the
WorkerPool
was received. - display_
name str - A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters. - effective_
annotations Mapping[str, str] - location str
- The location for the resource
- name str
- User-defined name of the
WorkerPool
. - network_
config WorkerPool Network Config Args - Network configuration for the
WorkerPool
. Structure is documented below. - project str
- The project for the resource
- state str
- Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED
- uid str
- Output only. A unique identifier for the
WorkerPool
. - update_
time str - Output only. Time at which the request to update the
WorkerPool
was received. - worker_
config WorkerPool Worker Config Args - Configuration to be used for a creating workers in the
WorkerPool
. Structure is documented below.
- annotations Map<String>
- User specified annotations. 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. - create
Time String - Output only. Time at which the request to create the
WorkerPool
was received. - delete
Time String - Output only. Time at which the request to delete the
WorkerPool
was received. - display
Name String - A user-specified, human-readable name for the
WorkerPool
. If provided, this value must be 1-63 characters. - effective
Annotations Map<String> - location String
- The location for the resource
- name String
- User-defined name of the
WorkerPool
. - network
Config Property Map - Network configuration for the
WorkerPool
. Structure is documented below. - project String
- The project for the resource
- state String
- Output only. WorkerPool state. Possible values: STATE_UNSPECIFIED, PENDING, APPROVED, REJECTED, CANCELLED
- uid String
- Output only. A unique identifier for the
WorkerPool
. - update
Time String - Output only. Time at which the request to update the
WorkerPool
was received. - worker
Config Property Map - Configuration to be used for a creating workers in the
WorkerPool
. Structure is documented below.
Supporting Types
WorkerPoolNetworkConfig, WorkerPoolNetworkConfigArgs
- Peered
Network string - Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to
WorkerPool.project_id
on the service producer network. Must be in the formatprojects/{project}/global/networks/{network}
, where{project}
is a project number, such as12345
, and{network}
is the name of a VPC network in the project. See (https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options) - Peered
Network stringIp Range - Immutable. Subnet IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g.
192.168.0.0/29
would specify an IP range starting at 192.168.0.0 with a prefix size of 29 bits./16
would specify a prefix size of 16 bits, with an automatically determined IP within the peered VPC. If unspecified, a value of/24
will be used.
- Peered
Network string - Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to
WorkerPool.project_id
on the service producer network. Must be in the formatprojects/{project}/global/networks/{network}
, where{project}
is a project number, such as12345
, and{network}
is the name of a VPC network in the project. See (https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options) - Peered
Network stringIp Range - Immutable. Subnet IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g.
192.168.0.0/29
would specify an IP range starting at 192.168.0.0 with a prefix size of 29 bits./16
would specify a prefix size of 16 bits, with an automatically determined IP within the peered VPC. If unspecified, a value of/24
will be used.
- peered
Network String - Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to
WorkerPool.project_id
on the service producer network. Must be in the formatprojects/{project}/global/networks/{network}
, where{project}
is a project number, such as12345
, and{network}
is the name of a VPC network in the project. See (https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options) - peered
Network StringIp Range - Immutable. Subnet IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g.
192.168.0.0/29
would specify an IP range starting at 192.168.0.0 with a prefix size of 29 bits./16
would specify a prefix size of 16 bits, with an automatically determined IP within the peered VPC. If unspecified, a value of/24
will be used.
- peered
Network string - Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to
WorkerPool.project_id
on the service producer network. Must be in the formatprojects/{project}/global/networks/{network}
, where{project}
is a project number, such as12345
, and{network}
is the name of a VPC network in the project. See (https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options) - peered
Network stringIp Range - Immutable. Subnet IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g.
192.168.0.0/29
would specify an IP range starting at 192.168.0.0 with a prefix size of 29 bits./16
would specify a prefix size of 16 bits, with an automatically determined IP within the peered VPC. If unspecified, a value of/24
will be used.
- peered_
network str - Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to
WorkerPool.project_id
on the service producer network. Must be in the formatprojects/{project}/global/networks/{network}
, where{project}
is a project number, such as12345
, and{network}
is the name of a VPC network in the project. See (https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options) - peered_
network_ strip_ range - Immutable. Subnet IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g.
192.168.0.0/29
would specify an IP range starting at 192.168.0.0 with a prefix size of 29 bits./16
would specify a prefix size of 16 bits, with an automatically determined IP within the peered VPC. If unspecified, a value of/24
will be used.
- peered
Network String - Immutable. The network definition that the workers are peered to. If this section is left empty, the workers will be peered to
WorkerPool.project_id
on the service producer network. Must be in the formatprojects/{project}/global/networks/{network}
, where{project}
is a project number, such as12345
, and{network}
is the name of a VPC network in the project. See (https://cloud.google.com/cloud-build/docs/custom-workers/set-up-custom-worker-pool-environment#understanding_the_network_configuration_options) - peered
Network StringIp Range - Immutable. Subnet IP range within the peered network. This is specified in CIDR notation with a slash and the subnet prefix size. You can optionally specify an IP address before the subnet prefix value. e.g.
192.168.0.0/29
would specify an IP range starting at 192.168.0.0 with a prefix size of 29 bits./16
would specify a prefix size of 16 bits, with an automatically determined IP within the peered VPC. If unspecified, a value of/24
will be used.
WorkerPoolWorkerConfig, WorkerPoolWorkerConfigArgs
- Disk
Size intGb - Size of the disk attached to the worker, in GB. See diskSizeGb. Specify a value of up to 1000. If
0
is specified, Cloud Build will use a standard disk size. - Machine
Type string - Machine type of a worker, such as
n1-standard-1
. See machineType. If left blank, Cloud Build will usen1-standard-1
. - No
External boolIp - If true, workers are created without any public address, which prevents network egress to public IPs.
- Disk
Size intGb - Size of the disk attached to the worker, in GB. See diskSizeGb. Specify a value of up to 1000. If
0
is specified, Cloud Build will use a standard disk size. - Machine
Type string - Machine type of a worker, such as
n1-standard-1
. See machineType. If left blank, Cloud Build will usen1-standard-1
. - No
External boolIp - If true, workers are created without any public address, which prevents network egress to public IPs.
- disk
Size IntegerGb - Size of the disk attached to the worker, in GB. See diskSizeGb. Specify a value of up to 1000. If
0
is specified, Cloud Build will use a standard disk size. - machine
Type String - Machine type of a worker, such as
n1-standard-1
. See machineType. If left blank, Cloud Build will usen1-standard-1
. - no
External BooleanIp - If true, workers are created without any public address, which prevents network egress to public IPs.
- disk
Size numberGb - Size of the disk attached to the worker, in GB. See diskSizeGb. Specify a value of up to 1000. If
0
is specified, Cloud Build will use a standard disk size. - machine
Type string - Machine type of a worker, such as
n1-standard-1
. See machineType. If left blank, Cloud Build will usen1-standard-1
. - no
External booleanIp - If true, workers are created without any public address, which prevents network egress to public IPs.
- disk_
size_ intgb - Size of the disk attached to the worker, in GB. See diskSizeGb. Specify a value of up to 1000. If
0
is specified, Cloud Build will use a standard disk size. - machine_
type str - Machine type of a worker, such as
n1-standard-1
. See machineType. If left blank, Cloud Build will usen1-standard-1
. - no_
external_ boolip - If true, workers are created without any public address, which prevents network egress to public IPs.
- disk
Size NumberGb - Size of the disk attached to the worker, in GB. See diskSizeGb. Specify a value of up to 1000. If
0
is specified, Cloud Build will use a standard disk size. - machine
Type String - Machine type of a worker, such as
n1-standard-1
. See machineType. If left blank, Cloud Build will usen1-standard-1
. - no
External BooleanIp - If true, workers are created without any public address, which prevents network egress to public IPs.
Import
WorkerPool can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/workerPools/{{name}}
{{project}}/{{location}}/{{name}}
{{location}}/{{name}}
When using the pulumi import
command, WorkerPool can be imported using one of the formats above. For example:
$ pulumi import gcp:cloudbuild/workerPool:WorkerPool default projects/{{project}}/locations/{{location}}/workerPools/{{name}}
$ pulumi import gcp:cloudbuild/workerPool:WorkerPool default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:cloudbuild/workerPool:WorkerPool default {{location}}/{{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.