Viewing docs for Defang GCP v2.4.1
published on Saturday, Jul 11, 2026 by Defang
published on Saturday, Jul 11, 2026 by Defang
Viewing docs for Defang GCP v2.4.1
published on Saturday, Jul 11, 2026 by Defang
published on Saturday, Jul 11, 2026 by Defang
Create Build Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Build(name: string, args: BuildArgs, opts?: CustomResourceOptions);@overload
def Build(resource_name: str,
args: BuildArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Build(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
project_id: Optional[str] = None,
source: Optional[str] = None,
steps: Optional[str] = None,
disk_size_gb: Optional[int] = None,
images: Optional[Sequence[str]] = None,
machine_type: Optional[str] = None,
max_wait_time: Optional[int] = None,
service_account: Optional[str] = None,
source_digest: Optional[str] = None,
substitutions: Optional[Mapping[str, str]] = None,
tags: Optional[Sequence[str]] = None)func NewBuild(ctx *Context, name string, args BuildArgs, opts ...ResourceOption) (*Build, error)public Build(string name, BuildArgs args, CustomResourceOptions? opts = null)type: defang-gcp:Build
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "defang-gcp_build" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args BuildArgs
- 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 BuildArgs
- 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 BuildArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BuildArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BuildArgs
- 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 buildResource = new DefangGcp.Build("buildResource", new()
{
Location = "string",
ProjectId = "string",
Source = "string",
Steps = "string",
DiskSizeGb = 0,
Images = new[]
{
"string",
},
MachineType = "string",
MaxWaitTime = 0,
ServiceAccount = "string",
SourceDigest = "string",
Substitutions =
{
{ "string", "string" },
},
Tags = new[]
{
"string",
},
});
example, err := defanggcp.NewBuild(ctx, "buildResource", &defanggcp.BuildArgs{
Location: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Source: pulumi.String("string"),
Steps: pulumi.String("string"),
DiskSizeGb: pulumi.Int(0),
Images: pulumi.StringArray{
pulumi.String("string"),
},
MachineType: pulumi.String("string"),
MaxWaitTime: pulumi.Int(0),
ServiceAccount: pulumi.String("string"),
SourceDigest: pulumi.String("string"),
Substitutions: pulumi.StringMap{
"string": pulumi.String("string"),
},
Tags: pulumi.StringArray{
pulumi.String("string"),
},
})
resource "defang-gcp_build" "buildResource" {
replace_on_changes = ["images[*]", "location", "projectId", "serviceAccount", "source", "sourceDigest", "steps"]
location = "string"
project_id = "string"
source = "string"
steps = "string"
disk_size_gb = 0
images = ["string"]
machine_type = "string"
max_wait_time = 0
service_account = "string"
source_digest = "string"
substitutions = {
"string" = "string"
}
tags = ["string"]
}
var buildResource = new Build("buildResource", BuildArgs.builder()
.location("string")
.projectId("string")
.source("string")
.steps("string")
.diskSizeGb(0)
.images("string")
.machineType("string")
.maxWaitTime(0)
.serviceAccount("string")
.sourceDigest("string")
.substitutions(Map.of("string", "string"))
.tags("string")
.build());
build_resource = defang_gcp.Build("buildResource",
location="string",
project_id="string",
source="string",
steps="string",
disk_size_gb=0,
images=["string"],
machine_type="string",
max_wait_time=0,
service_account="string",
source_digest="string",
substitutions={
"string": "string",
},
tags=["string"])
const buildResource = new defang_gcp.Build("buildResource", {
location: "string",
projectId: "string",
source: "string",
steps: "string",
diskSizeGb: 0,
images: ["string"],
machineType: "string",
maxWaitTime: 0,
serviceAccount: "string",
sourceDigest: "string",
substitutions: {
string: "string",
},
tags: ["string"],
});
type: defang-gcp:Build
properties:
diskSizeGb: 0
images:
- string
location: string
machineType: string
maxWaitTime: 0
projectId: string
serviceAccount: string
source: string
sourceDigest: string
steps: string
substitutions:
string: string
tags:
- string
Build 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 Build resource accepts the following input properties:
- Location string
- Project
Id string - Source string
- Steps string
- Disk
Size intGb - Images List<string>
- Machine
Type string - Max
Wait intTime - Service
Account string - Source
Digest string - Substitutions Dictionary<string, string>
- List<string>
- Location string
- Project
Id string - Source string
- Steps string
- Disk
Size intGb - Images []string
- Machine
Type string - Max
Wait intTime - Service
Account string - Source
Digest string - Substitutions map[string]string
- []string
- location string
- project_
id string - source string
- steps string
- disk_
size_ numbergb - images list(string)
- machine_
type string - max_
wait_ numbertime - service_
account string - source_
digest string - substitutions map(string)
- list(string)
- location String
- project
Id String - source String
- steps String
- disk
Size IntegerGb - images List<String>
- machine
Type String - max
Wait IntegerTime - service
Account String - source
Digest String - substitutions Map<String,String>
- List<String>
- location string
- project
Id string - source string
- steps string
- disk
Size numberGb - images string[]
- machine
Type string - max
Wait numberTime - service
Account string - source
Digest string - substitutions {[key: string]: string}
- string[]
- location str
- project_
id str - source str
- steps str
- disk_
size_ intgb - images Sequence[str]
- machine_
type str - max_
wait_ inttime - service_
account str - source_
digest str - substitutions Mapping[str, str]
- Sequence[str]
- location String
- project
Id String - source String
- steps String
- disk
Size NumberGb - images List<String>
- machine
Type String - max
Wait NumberTime - service
Account String - source
Digest String - substitutions Map<String>
- List<String>
Outputs
All input properties are implicitly available as output properties. Additionally, the Build resource produces the following output properties:
- Build
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Image
Digest string
- Build
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Image
Digest string
- build_
id string - id string
- The provider-assigned unique ID for this managed resource.
- image_
digest string
- build
Id String - id String
- The provider-assigned unique ID for this managed resource.
- image
Digest String
- build
Id string - id string
- The provider-assigned unique ID for this managed resource.
- image
Digest string
- build_
id str - id str
- The provider-assigned unique ID for this managed resource.
- image_
digest str
- build
Id String - id String
- The provider-assigned unique ID for this managed resource.
- image
Digest String
Package Details
- Repository
- defang-gcp DefangLabs/pulumi-defang
- License
- Apache-2.0
Viewing docs for Defang GCP v2.4.1
published on Saturday, Jul 11, 2026 by Defang
published on Saturday, Jul 11, 2026 by Defang