Fleet

class Fleet : KotlinCustomResource

Provides a CodeBuild Fleet Resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.codebuild.Fleet("test", {
baseCapacity: 2,
computeType: "BUILD_GENERAL1_SMALL",
environmentType: "LINUX_CONTAINER",
name: "full-example-codebuild-fleet",
overflowBehavior: "QUEUE",
scalingConfiguration: {
maxCapacity: 5,
scalingType: "TARGET_TRACKING_SCALING",
targetTrackingScalingConfigs: [{
metricType: "FLEET_UTILIZATION_RATE",
targetValue: 97.5,
}],
},
});
import pulumi
import pulumi_aws as aws
test = aws.codebuild.Fleet("test",
base_capacity=2,
compute_type="BUILD_GENERAL1_SMALL",
environment_type="LINUX_CONTAINER",
name="full-example-codebuild-fleet",
overflow_behavior="QUEUE",
scaling_configuration={
"max_capacity": 5,
"scaling_type": "TARGET_TRACKING_SCALING",
"target_tracking_scaling_configs": [{
"metric_type": "FLEET_UTILIZATION_RATE",
"target_value": 97.5,
}],
})
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var test = new Aws.CodeBuild.Fleet("test", new()
{
BaseCapacity = 2,
ComputeType = "BUILD_GENERAL1_SMALL",
EnvironmentType = "LINUX_CONTAINER",
Name = "full-example-codebuild-fleet",
OverflowBehavior = "QUEUE",
ScalingConfiguration = new Aws.CodeBuild.Inputs.FleetScalingConfigurationArgs
{
MaxCapacity = 5,
ScalingType = "TARGET_TRACKING_SCALING",
TargetTrackingScalingConfigs = new[]
{
new Aws.CodeBuild.Inputs.FleetScalingConfigurationTargetTrackingScalingConfigArgs
{
MetricType = "FLEET_UTILIZATION_RATE",
TargetValue = 97.5,
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codebuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := codebuild.NewFleet(ctx, "test", &codebuild.FleetArgs{
BaseCapacity: pulumi.Int(2),
ComputeType: pulumi.String("BUILD_GENERAL1_SMALL"),
EnvironmentType: pulumi.String("LINUX_CONTAINER"),
Name: pulumi.String("full-example-codebuild-fleet"),
OverflowBehavior: pulumi.String("QUEUE"),
ScalingConfiguration: &codebuild.FleetScalingConfigurationArgs{
MaxCapacity: pulumi.Int(5),
ScalingType: pulumi.String("TARGET_TRACKING_SCALING"),
TargetTrackingScalingConfigs: codebuild.FleetScalingConfigurationTargetTrackingScalingConfigArray{
&codebuild.FleetScalingConfigurationTargetTrackingScalingConfigArgs{
MetricType: pulumi.String("FLEET_UTILIZATION_RATE"),
TargetValue: pulumi.Float64(97.5),
},
},
},
})
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.aws.codebuild.Fleet;
import com.pulumi.aws.codebuild.FleetArgs;
import com.pulumi.aws.codebuild.inputs.FleetScalingConfigurationArgs;
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 test = new Fleet("test", FleetArgs.builder()
.baseCapacity(2)
.computeType("BUILD_GENERAL1_SMALL")
.environmentType("LINUX_CONTAINER")
.name("full-example-codebuild-fleet")
.overflowBehavior("QUEUE")
.scalingConfiguration(FleetScalingConfigurationArgs.builder()
.maxCapacity(5)
.scalingType("TARGET_TRACKING_SCALING")
.targetTrackingScalingConfigs(FleetScalingConfigurationTargetTrackingScalingConfigArgs.builder()
.metricType("FLEET_UTILIZATION_RATE")
.targetValue(97.5)
.build())
.build())
.build());
}
}
resources:
test:
type: aws:codebuild:Fleet
properties:
baseCapacity: 2
computeType: BUILD_GENERAL1_SMALL
environmentType: LINUX_CONTAINER
name: full-example-codebuild-fleet
overflowBehavior: QUEUE
scalingConfiguration:
maxCapacity: 5
scalingType: TARGET_TRACKING_SCALING
targetTrackingScalingConfigs:
- metricType: FLEET_UTILIZATION_RATE
targetValue: 97.5

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.codebuild.Fleet("example", {name: "example-codebuild-fleet"});
import pulumi
import pulumi_aws as aws
example = aws.codebuild.Fleet("example", name="example-codebuild-fleet")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.CodeBuild.Fleet("example", new()
{
Name = "example-codebuild-fleet",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codebuild"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := codebuild.NewFleet(ctx, "example", &codebuild.FleetArgs{
Name: pulumi.String("example-codebuild-fleet"),
})
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.aws.codebuild.Fleet;
import com.pulumi.aws.codebuild.FleetArgs;
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 example = new Fleet("example", FleetArgs.builder()
.name("example-codebuild-fleet")
.build());
}
}
resources:
example:
type: aws:codebuild:Fleet
properties:
name: example-codebuild-fleet

Import

Using pulumi import, import CodeBuild Fleet using the name. For example:

$ pulumi import aws:codebuild/fleet:Fleet name fleet-name

Properties

Link copied to clipboard
val arn: Output<String>

ARN of the Fleet.

Link copied to clipboard
val baseCapacity: Output<Int>

Number of machines allocated to the fleet.

Link copied to clipboard

The compute configuration of the compute fleet. This is only required if compute_type is set to ATTRIBUTE_BASED_COMPUTE. See compute_configuration below.

Link copied to clipboard
val computeType: Output<String>

Compute resources the compute fleet uses. See compute types for more information and valid values.

Link copied to clipboard
val created: Output<String>

Creation time of the fleet.

Link copied to clipboard
val environmentType: Output<String>

Environment type of the compute fleet. See environment types for more information and valid values. The following arguments are optional:

Link copied to clipboard
val fleetServiceRole: Output<String>?

The service role associated with the compute fleet.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val imageId: Output<String>?

The Amazon Machine Image (AMI) of the compute fleet.

Link copied to clipboard
val lastModified: Output<String>

Last modification time of the fleet.

Link copied to clipboard
val name: Output<String>

Fleet name.

Link copied to clipboard

Overflow behavior for compute fleet. Valid values: ON_DEMAND, QUEUE.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Configuration block. This option is only valid when your overflow behavior is QUEUE. See scaling_configuration below.

Link copied to clipboard
val statuses: Output<List<FleetStatus>>

Nested attribute containing information about the current status of the fleet.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>
Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

Configuration block. See vpc_config below.