PlacementGroupArgs

data class PlacementGroupArgs(val name: Output<String>? = null, val partitionCount: Output<Int>? = null, val spreadLevel: Output<String>? = null, val strategy: Output<Either<String, PlacementStrategy>>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<PlacementGroupArgs>

Provides an EC2 placement group. Read more about placement groups in AWS Docs.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.PlacementGroup;
import com.pulumi.aws.ec2.PlacementGroupArgs;
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 web = new PlacementGroup("web", PlacementGroupArgs.builder()
.strategy("cluster")
.build());
}
}

Import

Placement groups can be imported using the name, e.g.,

$ pulumi import aws:ec2/placementGroup:PlacementGroup prod_pg production-placement-group

Constructors

Link copied to clipboard
constructor(name: Output<String>? = null, partitionCount: Output<Int>? = null, spreadLevel: Output<String>? = null, strategy: Output<Either<String, PlacementStrategy>>? = null, tags: Output<Map<String, String>>? = null)

Properties

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

The name of the placement group.

Link copied to clipboard
val partitionCount: Output<Int>? = null

The number of partitions to create in the placement group. Can only be specified when the strategy is set to partition. Valid values are 1 - 7 (default is 2).

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

Determines how placement groups spread instances. Can only be used when the strategy is set to spread. Can be host or rack. host can only be used for Outpost placement groups. Defaults to rack.

Link copied to clipboard
val strategy: Output<Either<String, PlacementStrategy>>? = null

The placement strategy. Can be cluster, partition or spread.

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

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

Functions

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