Placement Group
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());
}
}
Content copied to clipboard
Import
Placement groups can be imported using the name
, e.g.,
$ pulumi import aws:ec2/placementGroup:PlacementGroup prod_pg production-placement-group
Content copied to clipboard
Properties
Link copied to clipboard
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
The ID of the placement group.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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
.