Try AWS Native preview for resources not in the classic version.
aws.emr.InstanceGroup
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Provides an Elastic MapReduce Cluster Instance Group configuration. See Amazon Elastic MapReduce Documentation for more information.
NOTE: At this time, Instance Groups cannot be destroyed through the API nor web interface. Instance Groups are destroyed when the EMR Cluster is destroyed. this provider will resize any Instance Group to zero when destroying the resource.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var task = new Aws.Emr.InstanceGroup("task", new()
{
ClusterId = aws_emr_cluster.Tf_test_cluster.Id,
InstanceCount = 1,
InstanceType = "m5.xlarge",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/emr"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := emr.NewInstanceGroup(ctx, "task", &emr.InstanceGroupArgs{
ClusterId: pulumi.Any(aws_emr_cluster.TfTestCluster.Id),
InstanceCount: pulumi.Int(1),
InstanceType: pulumi.String("m5.xlarge"),
})
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.emr.InstanceGroup;
import com.pulumi.aws.emr.InstanceGroupArgs;
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 task = new InstanceGroup("task", InstanceGroupArgs.builder()
.clusterId(aws_emr_cluster.tf-test-cluster().id())
.instanceCount(1)
.instanceType("m5.xlarge")
.build());
}
}
import pulumi
import pulumi_aws as aws
task = aws.emr.InstanceGroup("task",
cluster_id=aws_emr_cluster["tf-test-cluster"]["id"],
instance_count=1,
instance_type="m5.xlarge")
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const task = new aws.emr.InstanceGroup("task", {
clusterId: aws_emr_cluster["tf-test-cluster"].id,
instanceCount: 1,
instanceType: "m5.xlarge",
});
resources:
task:
type: aws:emr:InstanceGroup
properties:
clusterId: ${aws_emr_cluster"tf-test-cluster"[%!s(MISSING)].id}
instanceCount: 1
instanceType: m5.xlarge
Create InstanceGroup Resource
new InstanceGroup(name: string, args: InstanceGroupArgs, opts?: CustomResourceOptions);
@overload
def InstanceGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
autoscaling_policy: Optional[str] = None,
bid_price: Optional[str] = None,
cluster_id: Optional[str] = None,
configurations_json: Optional[str] = None,
ebs_configs: Optional[Sequence[InstanceGroupEbsConfigArgs]] = None,
ebs_optimized: Optional[bool] = None,
instance_count: Optional[int] = None,
instance_type: Optional[str] = None,
name: Optional[str] = None)
@overload
def InstanceGroup(resource_name: str,
args: InstanceGroupArgs,
opts: Optional[ResourceOptions] = None)
func NewInstanceGroup(ctx *Context, name string, args InstanceGroupArgs, opts ...ResourceOption) (*InstanceGroup, error)
public InstanceGroup(string name, InstanceGroupArgs args, CustomResourceOptions? opts = null)
public InstanceGroup(String name, InstanceGroupArgs args)
public InstanceGroup(String name, InstanceGroupArgs args, CustomResourceOptions options)
type: aws:emr:InstanceGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceGroupArgs
- 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 InstanceGroupArgs
- 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 InstanceGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args InstanceGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args InstanceGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
InstanceGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The InstanceGroup resource accepts the following input properties:
- Cluster
Id string ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
- Instance
Type string The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
- Autoscaling
Policy string The autoscaling policy document. This is a JSON formatted string. See EMR Auto Scaling
- Bid
Price string If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
- Configurations
Json string A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
- Ebs
Configs List<InstanceGroup Ebs Config Args> One or more
ebs_config
blocks as defined below. Changing this forces a new resource to be created.- Ebs
Optimized bool Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
- Instance
Count int target number of instances for the instance group. defaults to 0.
- Name string
Human friendly name given to the instance group. Changing this forces a new resource to be created.
- Cluster
Id string ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
- Instance
Type string The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
- Autoscaling
Policy string The autoscaling policy document. This is a JSON formatted string. See EMR Auto Scaling
- Bid
Price string If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
- Configurations
Json string A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
- Ebs
Configs []InstanceGroup Ebs Config Args One or more
ebs_config
blocks as defined below. Changing this forces a new resource to be created.- Ebs
Optimized bool Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
- Instance
Count int target number of instances for the instance group. defaults to 0.
- Name string
Human friendly name given to the instance group. Changing this forces a new resource to be created.
- cluster
Id String ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
- instance
Type String The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
- autoscaling
Policy String The autoscaling policy document. This is a JSON formatted string. See EMR Auto Scaling
- bid
Price String If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
- configurations
Json String A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
- ebs
Configs List<InstanceGroup Ebs Config Args> One or more
ebs_config
blocks as defined below. Changing this forces a new resource to be created.- ebs
Optimized Boolean Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
- instance
Count Integer target number of instances for the instance group. defaults to 0.
- name String
Human friendly name given to the instance group. Changing this forces a new resource to be created.
- cluster
Id string ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
- instance
Type string The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
- autoscaling
Policy string The autoscaling policy document. This is a JSON formatted string. See EMR Auto Scaling
- bid
Price string If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
- configurations
Json string A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
- ebs
Configs InstanceGroup Ebs Config Args[] One or more
ebs_config
blocks as defined below. Changing this forces a new resource to be created.- ebs
Optimized boolean Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
- instance
Count number target number of instances for the instance group. defaults to 0.
- name string
Human friendly name given to the instance group. Changing this forces a new resource to be created.
- cluster_
id str ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
- instance_
type str The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
- autoscaling_
policy str The autoscaling policy document. This is a JSON formatted string. See EMR Auto Scaling
- bid_
price str If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
- configurations_
json str A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
- ebs_
configs Sequence[InstanceGroup Ebs Config Args] One or more
ebs_config
blocks as defined below. Changing this forces a new resource to be created.- ebs_
optimized bool Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
- instance_
count int target number of instances for the instance group. defaults to 0.
- name str
Human friendly name given to the instance group. Changing this forces a new resource to be created.
- cluster
Id String ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
- instance
Type String The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
- autoscaling
Policy String The autoscaling policy document. This is a JSON formatted string. See EMR Auto Scaling
- bid
Price String If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
- configurations
Json String A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
- ebs
Configs List<Property Map> One or more
ebs_config
blocks as defined below. Changing this forces a new resource to be created.- ebs
Optimized Boolean Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
- instance
Count Number target number of instances for the instance group. defaults to 0.
- name String
Human friendly name given to the instance group. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the InstanceGroup resource produces the following output properties:
- Id string
The provider-assigned unique ID for this managed resource.
- Running
Instance intCount The number of instances currently running in this instance group.
- Status string
The current status of the instance group.
- Id string
The provider-assigned unique ID for this managed resource.
- Running
Instance intCount The number of instances currently running in this instance group.
- Status string
The current status of the instance group.
- id String
The provider-assigned unique ID for this managed resource.
- running
Instance IntegerCount The number of instances currently running in this instance group.
- status String
The current status of the instance group.
- id string
The provider-assigned unique ID for this managed resource.
- running
Instance numberCount The number of instances currently running in this instance group.
- status string
The current status of the instance group.
- id str
The provider-assigned unique ID for this managed resource.
- running_
instance_ intcount The number of instances currently running in this instance group.
- status str
The current status of the instance group.
- id String
The provider-assigned unique ID for this managed resource.
- running
Instance NumberCount The number of instances currently running in this instance group.
- status String
The current status of the instance group.
Look up Existing InstanceGroup Resource
Get an existing InstanceGroup resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: InstanceGroupState, opts?: CustomResourceOptions): InstanceGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
autoscaling_policy: Optional[str] = None,
bid_price: Optional[str] = None,
cluster_id: Optional[str] = None,
configurations_json: Optional[str] = None,
ebs_configs: Optional[Sequence[InstanceGroupEbsConfigArgs]] = None,
ebs_optimized: Optional[bool] = None,
instance_count: Optional[int] = None,
instance_type: Optional[str] = None,
name: Optional[str] = None,
running_instance_count: Optional[int] = None,
status: Optional[str] = None) -> InstanceGroup
func GetInstanceGroup(ctx *Context, name string, id IDInput, state *InstanceGroupState, opts ...ResourceOption) (*InstanceGroup, error)
public static InstanceGroup Get(string name, Input<string> id, InstanceGroupState? state, CustomResourceOptions? opts = null)
public static InstanceGroup get(String name, Output<String> id, InstanceGroupState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Autoscaling
Policy string The autoscaling policy document. This is a JSON formatted string. See EMR Auto Scaling
- Bid
Price string If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
- Cluster
Id string ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
- Configurations
Json string A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
- Ebs
Configs List<InstanceGroup Ebs Config Args> One or more
ebs_config
blocks as defined below. Changing this forces a new resource to be created.- Ebs
Optimized bool Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
- Instance
Count int target number of instances for the instance group. defaults to 0.
- Instance
Type string The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
- Name string
Human friendly name given to the instance group. Changing this forces a new resource to be created.
- Running
Instance intCount The number of instances currently running in this instance group.
- Status string
The current status of the instance group.
- Autoscaling
Policy string The autoscaling policy document. This is a JSON formatted string. See EMR Auto Scaling
- Bid
Price string If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
- Cluster
Id string ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
- Configurations
Json string A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
- Ebs
Configs []InstanceGroup Ebs Config Args One or more
ebs_config
blocks as defined below. Changing this forces a new resource to be created.- Ebs
Optimized bool Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
- Instance
Count int target number of instances for the instance group. defaults to 0.
- Instance
Type string The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
- Name string
Human friendly name given to the instance group. Changing this forces a new resource to be created.
- Running
Instance intCount The number of instances currently running in this instance group.
- Status string
The current status of the instance group.
- autoscaling
Policy String The autoscaling policy document. This is a JSON formatted string. See EMR Auto Scaling
- bid
Price String If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
- cluster
Id String ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
- configurations
Json String A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
- ebs
Configs List<InstanceGroup Ebs Config Args> One or more
ebs_config
blocks as defined below. Changing this forces a new resource to be created.- ebs
Optimized Boolean Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
- instance
Count Integer target number of instances for the instance group. defaults to 0.
- instance
Type String The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
- name String
Human friendly name given to the instance group. Changing this forces a new resource to be created.
- running
Instance IntegerCount The number of instances currently running in this instance group.
- status String
The current status of the instance group.
- autoscaling
Policy string The autoscaling policy document. This is a JSON formatted string. See EMR Auto Scaling
- bid
Price string If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
- cluster
Id string ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
- configurations
Json string A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
- ebs
Configs InstanceGroup Ebs Config Args[] One or more
ebs_config
blocks as defined below. Changing this forces a new resource to be created.- ebs
Optimized boolean Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
- instance
Count number target number of instances for the instance group. defaults to 0.
- instance
Type string The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
- name string
Human friendly name given to the instance group. Changing this forces a new resource to be created.
- running
Instance numberCount The number of instances currently running in this instance group.
- status string
The current status of the instance group.
- autoscaling_
policy str The autoscaling policy document. This is a JSON formatted string. See EMR Auto Scaling
- bid_
price str If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
- cluster_
id str ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
- configurations_
json str A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
- ebs_
configs Sequence[InstanceGroup Ebs Config Args] One or more
ebs_config
blocks as defined below. Changing this forces a new resource to be created.- ebs_
optimized bool Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
- instance_
count int target number of instances for the instance group. defaults to 0.
- instance_
type str The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
- name str
Human friendly name given to the instance group. Changing this forces a new resource to be created.
- running_
instance_ intcount The number of instances currently running in this instance group.
- status str
The current status of the instance group.
- autoscaling
Policy String The autoscaling policy document. This is a JSON formatted string. See EMR Auto Scaling
- bid
Price String If set, the bid price for each EC2 instance in the instance group, expressed in USD. By setting this attribute, the instance group is being declared as a Spot Instance, and will implicitly create a Spot request. Leave this blank to use On-Demand Instances.
- cluster
Id String ID of the EMR Cluster to attach to. Changing this forces a new resource to be created.
- configurations
Json String A JSON string for supplying list of configurations specific to the EMR instance group. Note that this can only be changed when using EMR release 5.21 or later.
- ebs
Configs List<Property Map> One or more
ebs_config
blocks as defined below. Changing this forces a new resource to be created.- ebs
Optimized Boolean Indicates whether an Amazon EBS volume is EBS-optimized. Changing this forces a new resource to be created.
- instance
Count Number target number of instances for the instance group. defaults to 0.
- instance
Type String The EC2 instance type for all instances in the instance group. Changing this forces a new resource to be created.
- name String
Human friendly name given to the instance group. Changing this forces a new resource to be created.
- running
Instance NumberCount The number of instances currently running in this instance group.
- status String
The current status of the instance group.
Supporting Types
InstanceGroupEbsConfig
- Size int
The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.
- Type string
The volume type. Valid options are 'gp2', 'io1' and 'standard'.
- Iops int
The number of I/O operations per second (IOPS) that the volume supports.
- Volumes
Per intInstance The number of EBS Volumes to attach per instance.
- Size int
The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.
- Type string
The volume type. Valid options are 'gp2', 'io1' and 'standard'.
- Iops int
The number of I/O operations per second (IOPS) that the volume supports.
- Volumes
Per intInstance The number of EBS Volumes to attach per instance.
- size Integer
The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.
- type String
The volume type. Valid options are 'gp2', 'io1' and 'standard'.
- iops Integer
The number of I/O operations per second (IOPS) that the volume supports.
- volumes
Per IntegerInstance The number of EBS Volumes to attach per instance.
- size number
The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.
- type string
The volume type. Valid options are 'gp2', 'io1' and 'standard'.
- iops number
The number of I/O operations per second (IOPS) that the volume supports.
- volumes
Per numberInstance The number of EBS Volumes to attach per instance.
- size int
The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.
- type str
The volume type. Valid options are 'gp2', 'io1' and 'standard'.
- iops int
The number of I/O operations per second (IOPS) that the volume supports.
- volumes_
per_ intinstance The number of EBS Volumes to attach per instance.
- size Number
The volume size, in gibibytes (GiB). This can be a number from 1 - 1024. If the volume type is EBS-optimized, the minimum value is 10.
- type String
The volume type. Valid options are 'gp2', 'io1' and 'standard'.
- iops Number
The number of I/O operations per second (IOPS) that the volume supports.
- volumes
Per NumberInstance The number of EBS Volumes to attach per instance.
Import
EMR task instance group can be imported using their EMR Cluster id and Instance Group id separated by a forward-slash /
, e.g.,
$ pulumi import aws:emr/instanceGroup:InstanceGroup task_group j-123456ABCDEF/ig-15EK4O09RZLNR
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.