Cluster Capacity Providers
Manages the capacity providers of an ECS Cluster. More information about capacity providers can be found in the ECS User Guide.
NOTE on Clusters and Cluster Capacity Providers: The provider provides both a standalone
aws.ecs.ClusterCapacityProviders
resource, as well as allowing the capacity providers and default strategies to be managed in-line by theaws.ecs.Cluster
resource. You cannot use a Cluster with in-line capacity providers in conjunction with the Capacity Providers resource, nor use more than one Capacity Providers resource with a single Cluster, as doing so will cause a conflict and will lead to mutual overwrites.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ecs.Cluster;
import com.pulumi.aws.ecs.ClusterCapacityProviders;
import com.pulumi.aws.ecs.ClusterCapacityProvidersArgs;
import com.pulumi.aws.ecs.inputs.ClusterCapacityProvidersDefaultCapacityProviderStrategyArgs;
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 exampleCluster = new Cluster("exampleCluster");
var exampleClusterCapacityProviders = new ClusterCapacityProviders("exampleClusterCapacityProviders", ClusterCapacityProvidersArgs.builder()
.clusterName(exampleCluster.name())
.capacityProviders("FARGATE")
.defaultCapacityProviderStrategies(ClusterCapacityProvidersDefaultCapacityProviderStrategyArgs.builder()
.base(1)
.weight(100)
.capacityProvider("FARGATE")
.build())
.build());
}
}
Content copied to clipboard
Import
ECS cluster capacity providers can be imported using the cluster_name
attribute. For example
$ pulumi import aws:ecs/clusterCapacityProviders:ClusterCapacityProviders example my-cluster
Content copied to clipboard
Properties
Link copied to clipboard
Link copied to clipboard