github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/emr/cluster.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package emr
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Provides an Elastic MapReduce Cluster, a web service that makes it easy to process large amounts of data efficiently. See [Amazon Elastic MapReduce Documentation](https://aws.amazon.com/documentation/elastic-mapreduce/) for more information.
    16  //
    17  // To configure [Instance Groups](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for [task nodes](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-task), see the `emr.InstanceGroup` resource.
    18  //
    19  // ## Example Usage
    20  //
    21  // <!--Start PulumiCodeChooser -->
    22  // ```go
    23  // package main
    24  //
    25  // import (
    26  //
    27  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
    28  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    29  //
    30  // )
    31  //
    32  //	func main() {
    33  //		pulumi.Run(func(ctx *pulumi.Context) error {
    34  //			_, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
    35  //				Name:         pulumi.String("emr-test-arn"),
    36  //				ReleaseLabel: pulumi.String("emr-4.6.0"),
    37  //				Applications: pulumi.StringArray{
    38  //					pulumi.String("Spark"),
    39  //				},
    40  //				AdditionalInfo: pulumi.String(`{
    41  //	  "instanceAwsClientConfiguration": {
    42  //	    "proxyPort": 8099,
    43  //	    "proxyHost": "myproxy.example.com"
    44  //	  }
    45  //	}
    46  //
    47  // `),
    48  //
    49  //	TerminationProtection:       pulumi.Bool(false),
    50  //	KeepJobFlowAliveWhenNoSteps: pulumi.Bool(true),
    51  //	Ec2Attributes: &emr.ClusterEc2AttributesArgs{
    52  //		SubnetId:                      pulumi.Any(main.Id),
    53  //		EmrManagedMasterSecurityGroup: pulumi.Any(sg.Id),
    54  //		EmrManagedSlaveSecurityGroup:  pulumi.Any(sg.Id),
    55  //		InstanceProfile:               pulumi.Any(emrProfile.Arn),
    56  //	},
    57  //	MasterInstanceGroup: &emr.ClusterMasterInstanceGroupArgs{
    58  //		InstanceType: pulumi.String("m4.large"),
    59  //	},
    60  //	CoreInstanceGroup: &emr.ClusterCoreInstanceGroupArgs{
    61  //		InstanceType:  pulumi.String("c4.large"),
    62  //		InstanceCount: pulumi.Int(1),
    63  //		EbsConfigs: emr.ClusterCoreInstanceGroupEbsConfigArray{
    64  //			&emr.ClusterCoreInstanceGroupEbsConfigArgs{
    65  //				Size:               pulumi.Int(40),
    66  //				Type:               pulumi.String("gp2"),
    67  //				VolumesPerInstance: pulumi.Int(1),
    68  //			},
    69  //		},
    70  //		BidPrice: pulumi.String("0.30"),
    71  //		AutoscalingPolicy: pulumi.String(`{
    72  //
    73  //	"Constraints": {
    74  //	  "MinCapacity": 1,
    75  //	  "MaxCapacity": 2
    76  //	},
    77  //
    78  // "Rules": [
    79  //
    80  //	{
    81  //	  "Name": "ScaleOutMemoryPercentage",
    82  //	  "Description": "Scale out if YARNMemoryAvailablePercentage is less than 15",
    83  //	  "Action": {
    84  //	    "SimpleScalingPolicyConfiguration": {
    85  //	      "AdjustmentType": "CHANGE_IN_CAPACITY",
    86  //	      "ScalingAdjustment": 1,
    87  //	      "CoolDown": 300
    88  //	    }
    89  //	  },
    90  //	  "Trigger": {
    91  //	    "CloudWatchAlarmDefinition": {
    92  //	      "ComparisonOperator": "LESS_THAN",
    93  //	      "EvaluationPeriods": 1,
    94  //	      "MetricName": "YARNMemoryAvailablePercentage",
    95  //	      "Namespace": "AWS/ElasticMapReduce",
    96  //	      "Period": 300,
    97  //	      "Statistic": "AVERAGE",
    98  //	      "Threshold": 15.0,
    99  //	      "Unit": "PERCENT"
   100  //	    }
   101  //	  }
   102  //	}
   103  //
   104  // ]
   105  // }
   106  // `),
   107  //
   108  //				},
   109  //				EbsRootVolumeSize: pulumi.Int(100),
   110  //				Tags: pulumi.StringMap{
   111  //					"role": pulumi.String("rolename"),
   112  //					"env":  pulumi.String("env"),
   113  //				},
   114  //				BootstrapActions: emr.ClusterBootstrapActionArray{
   115  //					&emr.ClusterBootstrapActionArgs{
   116  //						Path: pulumi.String("s3://elasticmapreduce/bootstrap-actions/run-if"),
   117  //						Name: pulumi.String("runif"),
   118  //						Args: pulumi.StringArray{
   119  //							pulumi.String("instance.isMaster=true"),
   120  //							pulumi.String("echo running on master node"),
   121  //						},
   122  //					},
   123  //				},
   124  //				ConfigurationsJson: pulumi.String(`  [
   125  //	    {
   126  //	      "Classification": "hadoop-env",
   127  //	      "Configurations": [
   128  //	        {
   129  //	          "Classification": "export",
   130  //	          "Properties": {
   131  //	            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
   132  //	          }
   133  //	        }
   134  //	      ],
   135  //	      "Properties": {}
   136  //	    },
   137  //	    {
   138  //	      "Classification": "spark-env",
   139  //	      "Configurations": [
   140  //	        {
   141  //	          "Classification": "export",
   142  //	          "Properties": {
   143  //	            "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
   144  //	          }
   145  //	        }
   146  //	      ],
   147  //	      "Properties": {}
   148  //	    }
   149  //	  ]
   150  //
   151  // `),
   152  //
   153  //				ServiceRole: pulumi.Any(iamEmrServiceRole.Arn),
   154  //			})
   155  //			if err != nil {
   156  //				return err
   157  //			}
   158  //			return nil
   159  //		})
   160  //	}
   161  //
   162  // ```
   163  // <!--End PulumiCodeChooser -->
   164  //
   165  // The `emr.Cluster` resource typically requires two IAM roles, one for the EMR Cluster to use as a service role, and another is assigned to every EC2 instance in a cluster and each application process that runs on a cluster assumes this role for permissions to interact with other AWS services. An additional role, the Auto Scaling role, is required if your cluster uses automatic scaling in Amazon EMR.
   166  //
   167  // The default AWS managed EMR service role is called `EMR_DefaultRole` with Amazon managed policy `AmazonEMRServicePolicy_v2` attached. The name of default instance profile role is `EMR_EC2_DefaultRole` with default managed policy `AmazonElasticMapReduceforEC2Role` attached, but it is on the path to deprecation and will not be replaced with another default managed policy. You'll need to create and specify an instance profile to replace the deprecated role and default policy. See the [Configure IAM service roles for Amazon EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-iam-roles.html) guide for more information on these IAM roles. There is also a fully-bootable example Pulumi configuration at the bottom of this page.
   168  //
   169  // ### Instance Fleet
   170  //
   171  // <!--Start PulumiCodeChooser -->
   172  // ```go
   173  // package main
   174  //
   175  // import (
   176  //
   177  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
   178  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   179  //
   180  // )
   181  //
   182  //	func main() {
   183  //		pulumi.Run(func(ctx *pulumi.Context) error {
   184  //			example, err := emr.NewCluster(ctx, "example", &emr.ClusterArgs{
   185  //				MasterInstanceFleet: &emr.ClusterMasterInstanceFleetArgs{
   186  //					InstanceTypeConfigs: emr.ClusterMasterInstanceFleetInstanceTypeConfigArray{
   187  //						&emr.ClusterMasterInstanceFleetInstanceTypeConfigArgs{
   188  //							InstanceType: pulumi.String("m4.xlarge"),
   189  //						},
   190  //					},
   191  //					TargetOnDemandCapacity: pulumi.Int(1),
   192  //				},
   193  //				CoreInstanceFleet: &emr.ClusterCoreInstanceFleetArgs{
   194  //					InstanceTypeConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigArray{
   195  //						&emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{
   196  //							BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(80),
   197  //							EbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{
   198  //								&emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{
   199  //									Size:               pulumi.Int(100),
   200  //									Type:               pulumi.String("gp2"),
   201  //									VolumesPerInstance: pulumi.Int(1),
   202  //								},
   203  //							},
   204  //							InstanceType:     pulumi.String("m3.xlarge"),
   205  //							WeightedCapacity: pulumi.Int(1),
   206  //						},
   207  //						&emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{
   208  //							BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),
   209  //							EbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{
   210  //								&emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{
   211  //									Size:               pulumi.Int(100),
   212  //									Type:               pulumi.String("gp2"),
   213  //									VolumesPerInstance: pulumi.Int(1),
   214  //								},
   215  //							},
   216  //							InstanceType:     pulumi.String("m4.xlarge"),
   217  //							WeightedCapacity: pulumi.Int(1),
   218  //						},
   219  //						&emr.ClusterCoreInstanceFleetInstanceTypeConfigArgs{
   220  //							BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),
   221  //							EbsConfigs: emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArray{
   222  //								&emr.ClusterCoreInstanceFleetInstanceTypeConfigEbsConfigArgs{
   223  //									Size:               pulumi.Int(100),
   224  //									Type:               pulumi.String("gp2"),
   225  //									VolumesPerInstance: pulumi.Int(1),
   226  //								},
   227  //							},
   228  //							InstanceType:     pulumi.String("m4.2xlarge"),
   229  //							WeightedCapacity: pulumi.Int(2),
   230  //						},
   231  //					},
   232  //					LaunchSpecifications: &emr.ClusterCoreInstanceFleetLaunchSpecificationsArgs{
   233  //						SpotSpecifications: emr.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArray{
   234  //							&emr.ClusterCoreInstanceFleetLaunchSpecificationsSpotSpecificationArgs{
   235  //								AllocationStrategy:     pulumi.String("capacity-optimized"),
   236  //								BlockDurationMinutes:   pulumi.Int(0),
   237  //								TimeoutAction:          pulumi.String("SWITCH_TO_ON_DEMAND"),
   238  //								TimeoutDurationMinutes: pulumi.Int(10),
   239  //							},
   240  //						},
   241  //					},
   242  //					Name:                   pulumi.String("core fleet"),
   243  //					TargetOnDemandCapacity: pulumi.Int(2),
   244  //					TargetSpotCapacity:     pulumi.Int(2),
   245  //				},
   246  //			})
   247  //			if err != nil {
   248  //				return err
   249  //			}
   250  //			_, err = emr.NewInstanceFleet(ctx, "task", &emr.InstanceFleetArgs{
   251  //				ClusterId: example.ID(),
   252  //				InstanceTypeConfigs: emr.InstanceFleetInstanceTypeConfigArray{
   253  //					&emr.InstanceFleetInstanceTypeConfigArgs{
   254  //						BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),
   255  //						EbsConfigs: emr.InstanceFleetInstanceTypeConfigEbsConfigArray{
   256  //							&emr.InstanceFleetInstanceTypeConfigEbsConfigArgs{
   257  //								Size:               pulumi.Int(100),
   258  //								Type:               pulumi.String("gp2"),
   259  //								VolumesPerInstance: pulumi.Int(1),
   260  //							},
   261  //						},
   262  //						InstanceType:     pulumi.String("m4.xlarge"),
   263  //						WeightedCapacity: pulumi.Int(1),
   264  //					},
   265  //					&emr.InstanceFleetInstanceTypeConfigArgs{
   266  //						BidPriceAsPercentageOfOnDemandPrice: pulumi.Float64(100),
   267  //						EbsConfigs: emr.InstanceFleetInstanceTypeConfigEbsConfigArray{
   268  //							&emr.InstanceFleetInstanceTypeConfigEbsConfigArgs{
   269  //								Size:               pulumi.Int(100),
   270  //								Type:               pulumi.String("gp2"),
   271  //								VolumesPerInstance: pulumi.Int(1),
   272  //							},
   273  //						},
   274  //						InstanceType:     pulumi.String("m4.2xlarge"),
   275  //						WeightedCapacity: pulumi.Int(2),
   276  //					},
   277  //				},
   278  //				LaunchSpecifications: &emr.InstanceFleetLaunchSpecificationsArgs{
   279  //					SpotSpecifications: emr.InstanceFleetLaunchSpecificationsSpotSpecificationArray{
   280  //						&emr.InstanceFleetLaunchSpecificationsSpotSpecificationArgs{
   281  //							AllocationStrategy:     pulumi.String("capacity-optimized"),
   282  //							BlockDurationMinutes:   pulumi.Int(0),
   283  //							TimeoutAction:          pulumi.String("TERMINATE_CLUSTER"),
   284  //							TimeoutDurationMinutes: pulumi.Int(10),
   285  //						},
   286  //					},
   287  //				},
   288  //				Name:                   pulumi.String("task fleet"),
   289  //				TargetOnDemandCapacity: pulumi.Int(1),
   290  //				TargetSpotCapacity:     pulumi.Int(1),
   291  //			})
   292  //			if err != nil {
   293  //				return err
   294  //			}
   295  //			return nil
   296  //		})
   297  //	}
   298  //
   299  // ```
   300  // <!--End PulumiCodeChooser -->
   301  //
   302  // ### Enable Debug Logging
   303  //
   304  // [Debug logging in EMR](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-debugging.html) is implemented as a step. It is highly recommended that you utilize the resource options configuration with `ignoreChanges` if other steps are being managed outside of this provider.
   305  //
   306  // <!--Start PulumiCodeChooser -->
   307  // ```go
   308  // package main
   309  //
   310  // import (
   311  //
   312  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
   313  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   314  //
   315  // )
   316  //
   317  //	func main() {
   318  //		pulumi.Run(func(ctx *pulumi.Context) error {
   319  //			_, err := emr.NewCluster(ctx, "example", &emr.ClusterArgs{
   320  //				Steps: emr.ClusterStepArray{
   321  //					&emr.ClusterStepArgs{
   322  //						ActionOnFailure: pulumi.String("TERMINATE_CLUSTER"),
   323  //						Name:            pulumi.String("Setup Hadoop Debugging"),
   324  //						HadoopJarStep: &emr.ClusterStepHadoopJarStepArgs{
   325  //							Jar: pulumi.String("command-runner.jar"),
   326  //							Args: pulumi.StringArray{
   327  //								pulumi.String("state-pusher-script"),
   328  //							},
   329  //						},
   330  //					},
   331  //				},
   332  //			})
   333  //			if err != nil {
   334  //				return err
   335  //			}
   336  //			return nil
   337  //		})
   338  //	}
   339  //
   340  // ```
   341  // <!--End PulumiCodeChooser -->
   342  //
   343  // ### Multiple Node Master Instance Group
   344  //
   345  // Available in EMR version 5.23.0 and later, an EMR Cluster can be launched with three master nodes for high availability. Additional information about this functionality and its requirements can be found in the [EMR Management Guide](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-ha.html).
   346  //
   347  // <!--Start PulumiCodeChooser -->
   348  // ```go
   349  // package main
   350  //
   351  // import (
   352  //
   353  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
   354  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
   355  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   356  //
   357  // )
   358  //
   359  //	func main() {
   360  //		pulumi.Run(func(ctx *pulumi.Context) error {
   361  //			// This configuration is for illustrative purposes and highlights
   362  //			// only relevant configurations for working with this functionality.
   363  //			// Map public IP on launch must be enabled for public (Internet accessible) subnets
   364  //			example, err := ec2.NewSubnet(ctx, "example", &ec2.SubnetArgs{
   365  //				MapPublicIpOnLaunch: pulumi.Bool(true),
   366  //			})
   367  //			if err != nil {
   368  //				return err
   369  //			}
   370  //			_, err = emr.NewCluster(ctx, "example", &emr.ClusterArgs{
   371  //				ReleaseLabel:          pulumi.String("emr-5.24.1"),
   372  //				TerminationProtection: pulumi.Bool(true),
   373  //				Ec2Attributes: &emr.ClusterEc2AttributesArgs{
   374  //					SubnetId: example.ID(),
   375  //				},
   376  //				MasterInstanceGroup: &emr.ClusterMasterInstanceGroupArgs{
   377  //					InstanceCount: pulumi.Int(3),
   378  //				},
   379  //				CoreInstanceGroup: nil,
   380  //			})
   381  //			if err != nil {
   382  //				return err
   383  //			}
   384  //			return nil
   385  //		})
   386  //	}
   387  //
   388  // ```
   389  // <!--End PulumiCodeChooser -->
   390  //
   391  // ## Import
   392  //
   393  // Using `pulumi import`, import EMR clusters using the `id`. For example:
   394  //
   395  // ```sh
   396  // $ pulumi import aws:emr/cluster:Cluster cluster j-123456ABCDEF
   397  // ```
   398  // Since the API does not return the actual values for Kerberos configurations, environments with those options set will need to use the `lifecycle` configuration block `ignore_changes` argument available to all Pulumi resources to prevent perpetual differences. For example:
   399  type Cluster struct {
   400  	pulumi.CustomResourceState
   401  
   402  	// JSON string for selecting additional features such as adding proxy information. Note: Currently there is no API to retrieve the value of this argument after EMR cluster creation from provider, therefore the provider cannot detect drift from the actual EMR cluster if its value is changed outside the provider.
   403  	AdditionalInfo pulumi.StringPtrOutput `pulumi:"additionalInfo"`
   404  	// A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html).
   405  	Applications pulumi.StringArrayOutput `pulumi:"applications"`
   406  	// ARN of the cluster.
   407  	Arn pulumi.StringOutput `pulumi:"arn"`
   408  	// An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.
   409  	AutoTerminationPolicy ClusterAutoTerminationPolicyPtrOutput `pulumi:"autoTerminationPolicy"`
   410  	// IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.
   411  	AutoscalingRole pulumi.StringPtrOutput `pulumi:"autoscalingRole"`
   412  	// Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
   413  	BootstrapActions ClusterBootstrapActionArrayOutput `pulumi:"bootstrapActions"`
   414  	ClusterState     pulumi.StringOutput               `pulumi:"clusterState"`
   415  	// List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration. See [AWS Documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) for more information.
   416  	Configurations pulumi.StringPtrOutput `pulumi:"configurations"`
   417  	// JSON string for supplying list of configurations for the EMR cluster.
   418  	//
   419  	// > **NOTE on `configurationsJson`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`.
   420  	//
   421  	// <!--Start PulumiCodeChooser -->
   422  	// ```go
   423  	// package main
   424  	//
   425  	// import (
   426  	// 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
   427  	// 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   428  	// )
   429  	//
   430  	// func main() {
   431  	// 	pulumi.Run(func(ctx *pulumi.Context) error {
   432  	// 		_, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
   433  	// 			ConfigurationsJson: pulumi.String(`[
   434  	// {
   435  	// "Classification": "hadoop-env",
   436  	// "Configurations": [
   437  	// {
   438  	// "Classification": "export",
   439  	// "Properties": {
   440  	// "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
   441  	// }
   442  	// }
   443  	// ],
   444  	// "Properties": {}
   445  	// }
   446  	// ]
   447  	// `),
   448  	// 		})
   449  	// 		if err != nil {
   450  	// 			return err
   451  	// 		}
   452  	// 		return nil
   453  	// 	})
   454  	// }
   455  	// ```
   456  	// <!--End PulumiCodeChooser -->
   457  	ConfigurationsJson pulumi.StringPtrOutput `pulumi:"configurationsJson"`
   458  	// Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the core node type. Cannot be specified if any `coreInstanceGroup` configuration blocks are set. Detailed below.
   459  	CoreInstanceFleet ClusterCoreInstanceFleetOutput `pulumi:"coreInstanceFleet"`
   460  	// Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core).
   461  	CoreInstanceGroup ClusterCoreInstanceGroupOutput `pulumi:"coreInstanceGroup"`
   462  	// Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.
   463  	CustomAmiId pulumi.StringPtrOutput `pulumi:"customAmiId"`
   464  	// Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.
   465  	EbsRootVolumeSize pulumi.IntPtrOutput `pulumi:"ebsRootVolumeSize"`
   466  	// Attributes for the EC2 instances running the job flow. See below.
   467  	Ec2Attributes ClusterEc2AttributesPtrOutput `pulumi:"ec2Attributes"`
   468  	// Switch on/off run cluster with no steps or when all steps are complete (default is on)
   469  	KeepJobFlowAliveWhenNoSteps pulumi.BoolOutput `pulumi:"keepJobFlowAliveWhenNoSteps"`
   470  	// Kerberos configuration for the cluster. See below.
   471  	KerberosAttributes ClusterKerberosAttributesPtrOutput `pulumi:"kerberosAttributes"`
   472  	// List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps
   473  	ListStepsStates pulumi.StringArrayOutput `pulumi:"listStepsStates"`
   474  	// AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
   475  	LogEncryptionKmsKeyId pulumi.StringPtrOutput `pulumi:"logEncryptionKmsKeyId"`
   476  	// S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.
   477  	LogUri pulumi.StringPtrOutput `pulumi:"logUri"`
   478  	// Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the master node type. Cannot be specified if any `masterInstanceGroup` configuration blocks are set. Detailed below.
   479  	MasterInstanceFleet ClusterMasterInstanceFleetOutput `pulumi:"masterInstanceFleet"`
   480  	// Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [master node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-master).
   481  	MasterInstanceGroup ClusterMasterInstanceGroupOutput `pulumi:"masterInstanceGroup"`
   482  	// The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.
   483  	MasterPublicDns pulumi.StringOutput `pulumi:"masterPublicDns"`
   484  	// Name of the job flow.
   485  	Name pulumi.StringOutput `pulumi:"name"`
   486  	// The specified placement group configuration for an Amazon EMR cluster.
   487  	PlacementGroupConfigs ClusterPlacementGroupConfigArrayOutput `pulumi:"placementGroupConfigs"`
   488  	// Release label for the Amazon EMR release.
   489  	ReleaseLabel pulumi.StringOutput `pulumi:"releaseLabel"`
   490  	// Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized.
   491  	ScaleDownBehavior pulumi.StringOutput `pulumi:"scaleDownBehavior"`
   492  	// Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `releaseLabel` 4.8.0 or greater.
   493  	SecurityConfiguration pulumi.StringPtrOutput `pulumi:"securityConfiguration"`
   494  	// IAM role that will be assumed by the Amazon EMR service to access AWS resources.
   495  	//
   496  	// The following arguments are optional:
   497  	ServiceRole pulumi.StringOutput `pulumi:"serviceRole"`
   498  	// Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with `releaseLabel` 5.28.0 or greater (default is 1).
   499  	StepConcurrencyLevel pulumi.IntPtrOutput `pulumi:"stepConcurrencyLevel"`
   500  	// List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
   501  	Steps ClusterStepArrayOutput `pulumi:"steps"`
   502  	// list of tags to apply to the EMR Cluster. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   503  	Tags pulumi.StringMapOutput `pulumi:"tags"`
   504  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   505  	//
   506  	// Deprecated: Please use `tags` instead.
   507  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
   508  	// Switch on/off termination protection (default is `false`, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to `false`.
   509  	TerminationProtection pulumi.BoolOutput `pulumi:"terminationProtection"`
   510  	// Whether whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. Default value is `false`.
   511  	UnhealthyNodeReplacement pulumi.BoolPtrOutput `pulumi:"unhealthyNodeReplacement"`
   512  	// Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is `true`.
   513  	VisibleToAllUsers pulumi.BoolPtrOutput `pulumi:"visibleToAllUsers"`
   514  }
   515  
   516  // NewCluster registers a new resource with the given unique name, arguments, and options.
   517  func NewCluster(ctx *pulumi.Context,
   518  	name string, args *ClusterArgs, opts ...pulumi.ResourceOption) (*Cluster, error) {
   519  	if args == nil {
   520  		return nil, errors.New("missing one or more required arguments")
   521  	}
   522  
   523  	if args.ReleaseLabel == nil {
   524  		return nil, errors.New("invalid value for required argument 'ReleaseLabel'")
   525  	}
   526  	if args.ServiceRole == nil {
   527  		return nil, errors.New("invalid value for required argument 'ServiceRole'")
   528  	}
   529  	opts = internal.PkgResourceDefaultOpts(opts)
   530  	var resource Cluster
   531  	err := ctx.RegisterResource("aws:emr/cluster:Cluster", name, args, &resource, opts...)
   532  	if err != nil {
   533  		return nil, err
   534  	}
   535  	return &resource, nil
   536  }
   537  
   538  // GetCluster gets an existing Cluster resource's state with the given name, ID, and optional
   539  // state properties that are used to uniquely qualify the lookup (nil if not required).
   540  func GetCluster(ctx *pulumi.Context,
   541  	name string, id pulumi.IDInput, state *ClusterState, opts ...pulumi.ResourceOption) (*Cluster, error) {
   542  	var resource Cluster
   543  	err := ctx.ReadResource("aws:emr/cluster:Cluster", name, id, state, &resource, opts...)
   544  	if err != nil {
   545  		return nil, err
   546  	}
   547  	return &resource, nil
   548  }
   549  
   550  // Input properties used for looking up and filtering Cluster resources.
   551  type clusterState struct {
   552  	// JSON string for selecting additional features such as adding proxy information. Note: Currently there is no API to retrieve the value of this argument after EMR cluster creation from provider, therefore the provider cannot detect drift from the actual EMR cluster if its value is changed outside the provider.
   553  	AdditionalInfo *string `pulumi:"additionalInfo"`
   554  	// A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html).
   555  	Applications []string `pulumi:"applications"`
   556  	// ARN of the cluster.
   557  	Arn *string `pulumi:"arn"`
   558  	// An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.
   559  	AutoTerminationPolicy *ClusterAutoTerminationPolicy `pulumi:"autoTerminationPolicy"`
   560  	// IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.
   561  	AutoscalingRole *string `pulumi:"autoscalingRole"`
   562  	// Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
   563  	BootstrapActions []ClusterBootstrapAction `pulumi:"bootstrapActions"`
   564  	ClusterState     *string                  `pulumi:"clusterState"`
   565  	// List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration. See [AWS Documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) for more information.
   566  	Configurations *string `pulumi:"configurations"`
   567  	// JSON string for supplying list of configurations for the EMR cluster.
   568  	//
   569  	// > **NOTE on `configurationsJson`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`.
   570  	//
   571  	// <!--Start PulumiCodeChooser -->
   572  	// ```go
   573  	// package main
   574  	//
   575  	// import (
   576  	// 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
   577  	// 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   578  	// )
   579  	//
   580  	// func main() {
   581  	// 	pulumi.Run(func(ctx *pulumi.Context) error {
   582  	// 		_, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
   583  	// 			ConfigurationsJson: pulumi.String(`[
   584  	// {
   585  	// "Classification": "hadoop-env",
   586  	// "Configurations": [
   587  	// {
   588  	// "Classification": "export",
   589  	// "Properties": {
   590  	// "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
   591  	// }
   592  	// }
   593  	// ],
   594  	// "Properties": {}
   595  	// }
   596  	// ]
   597  	// `),
   598  	// 		})
   599  	// 		if err != nil {
   600  	// 			return err
   601  	// 		}
   602  	// 		return nil
   603  	// 	})
   604  	// }
   605  	// ```
   606  	// <!--End PulumiCodeChooser -->
   607  	ConfigurationsJson *string `pulumi:"configurationsJson"`
   608  	// Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the core node type. Cannot be specified if any `coreInstanceGroup` configuration blocks are set. Detailed below.
   609  	CoreInstanceFleet *ClusterCoreInstanceFleet `pulumi:"coreInstanceFleet"`
   610  	// Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core).
   611  	CoreInstanceGroup *ClusterCoreInstanceGroup `pulumi:"coreInstanceGroup"`
   612  	// Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.
   613  	CustomAmiId *string `pulumi:"customAmiId"`
   614  	// Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.
   615  	EbsRootVolumeSize *int `pulumi:"ebsRootVolumeSize"`
   616  	// Attributes for the EC2 instances running the job flow. See below.
   617  	Ec2Attributes *ClusterEc2Attributes `pulumi:"ec2Attributes"`
   618  	// Switch on/off run cluster with no steps or when all steps are complete (default is on)
   619  	KeepJobFlowAliveWhenNoSteps *bool `pulumi:"keepJobFlowAliveWhenNoSteps"`
   620  	// Kerberos configuration for the cluster. See below.
   621  	KerberosAttributes *ClusterKerberosAttributes `pulumi:"kerberosAttributes"`
   622  	// List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps
   623  	ListStepsStates []string `pulumi:"listStepsStates"`
   624  	// AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
   625  	LogEncryptionKmsKeyId *string `pulumi:"logEncryptionKmsKeyId"`
   626  	// S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.
   627  	LogUri *string `pulumi:"logUri"`
   628  	// Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the master node type. Cannot be specified if any `masterInstanceGroup` configuration blocks are set. Detailed below.
   629  	MasterInstanceFleet *ClusterMasterInstanceFleet `pulumi:"masterInstanceFleet"`
   630  	// Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [master node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-master).
   631  	MasterInstanceGroup *ClusterMasterInstanceGroup `pulumi:"masterInstanceGroup"`
   632  	// The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.
   633  	MasterPublicDns *string `pulumi:"masterPublicDns"`
   634  	// Name of the job flow.
   635  	Name *string `pulumi:"name"`
   636  	// The specified placement group configuration for an Amazon EMR cluster.
   637  	PlacementGroupConfigs []ClusterPlacementGroupConfig `pulumi:"placementGroupConfigs"`
   638  	// Release label for the Amazon EMR release.
   639  	ReleaseLabel *string `pulumi:"releaseLabel"`
   640  	// Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized.
   641  	ScaleDownBehavior *string `pulumi:"scaleDownBehavior"`
   642  	// Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `releaseLabel` 4.8.0 or greater.
   643  	SecurityConfiguration *string `pulumi:"securityConfiguration"`
   644  	// IAM role that will be assumed by the Amazon EMR service to access AWS resources.
   645  	//
   646  	// The following arguments are optional:
   647  	ServiceRole *string `pulumi:"serviceRole"`
   648  	// Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with `releaseLabel` 5.28.0 or greater (default is 1).
   649  	StepConcurrencyLevel *int `pulumi:"stepConcurrencyLevel"`
   650  	// List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
   651  	Steps []ClusterStep `pulumi:"steps"`
   652  	// list of tags to apply to the EMR Cluster. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   653  	Tags map[string]string `pulumi:"tags"`
   654  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   655  	//
   656  	// Deprecated: Please use `tags` instead.
   657  	TagsAll map[string]string `pulumi:"tagsAll"`
   658  	// Switch on/off termination protection (default is `false`, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to `false`.
   659  	TerminationProtection *bool `pulumi:"terminationProtection"`
   660  	// Whether whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. Default value is `false`.
   661  	UnhealthyNodeReplacement *bool `pulumi:"unhealthyNodeReplacement"`
   662  	// Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is `true`.
   663  	VisibleToAllUsers *bool `pulumi:"visibleToAllUsers"`
   664  }
   665  
   666  type ClusterState struct {
   667  	// JSON string for selecting additional features such as adding proxy information. Note: Currently there is no API to retrieve the value of this argument after EMR cluster creation from provider, therefore the provider cannot detect drift from the actual EMR cluster if its value is changed outside the provider.
   668  	AdditionalInfo pulumi.StringPtrInput
   669  	// A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html).
   670  	Applications pulumi.StringArrayInput
   671  	// ARN of the cluster.
   672  	Arn pulumi.StringPtrInput
   673  	// An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.
   674  	AutoTerminationPolicy ClusterAutoTerminationPolicyPtrInput
   675  	// IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.
   676  	AutoscalingRole pulumi.StringPtrInput
   677  	// Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
   678  	BootstrapActions ClusterBootstrapActionArrayInput
   679  	ClusterState     pulumi.StringPtrInput
   680  	// List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration. See [AWS Documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) for more information.
   681  	Configurations pulumi.StringPtrInput
   682  	// JSON string for supplying list of configurations for the EMR cluster.
   683  	//
   684  	// > **NOTE on `configurationsJson`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`.
   685  	//
   686  	// <!--Start PulumiCodeChooser -->
   687  	// ```go
   688  	// package main
   689  	//
   690  	// import (
   691  	// 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
   692  	// 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   693  	// )
   694  	//
   695  	// func main() {
   696  	// 	pulumi.Run(func(ctx *pulumi.Context) error {
   697  	// 		_, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
   698  	// 			ConfigurationsJson: pulumi.String(`[
   699  	// {
   700  	// "Classification": "hadoop-env",
   701  	// "Configurations": [
   702  	// {
   703  	// "Classification": "export",
   704  	// "Properties": {
   705  	// "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
   706  	// }
   707  	// }
   708  	// ],
   709  	// "Properties": {}
   710  	// }
   711  	// ]
   712  	// `),
   713  	// 		})
   714  	// 		if err != nil {
   715  	// 			return err
   716  	// 		}
   717  	// 		return nil
   718  	// 	})
   719  	// }
   720  	// ```
   721  	// <!--End PulumiCodeChooser -->
   722  	ConfigurationsJson pulumi.StringPtrInput
   723  	// Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the core node type. Cannot be specified if any `coreInstanceGroup` configuration blocks are set. Detailed below.
   724  	CoreInstanceFleet ClusterCoreInstanceFleetPtrInput
   725  	// Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core).
   726  	CoreInstanceGroup ClusterCoreInstanceGroupPtrInput
   727  	// Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.
   728  	CustomAmiId pulumi.StringPtrInput
   729  	// Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.
   730  	EbsRootVolumeSize pulumi.IntPtrInput
   731  	// Attributes for the EC2 instances running the job flow. See below.
   732  	Ec2Attributes ClusterEc2AttributesPtrInput
   733  	// Switch on/off run cluster with no steps or when all steps are complete (default is on)
   734  	KeepJobFlowAliveWhenNoSteps pulumi.BoolPtrInput
   735  	// Kerberos configuration for the cluster. See below.
   736  	KerberosAttributes ClusterKerberosAttributesPtrInput
   737  	// List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps
   738  	ListStepsStates pulumi.StringArrayInput
   739  	// AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
   740  	LogEncryptionKmsKeyId pulumi.StringPtrInput
   741  	// S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.
   742  	LogUri pulumi.StringPtrInput
   743  	// Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the master node type. Cannot be specified if any `masterInstanceGroup` configuration blocks are set. Detailed below.
   744  	MasterInstanceFleet ClusterMasterInstanceFleetPtrInput
   745  	// Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [master node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-master).
   746  	MasterInstanceGroup ClusterMasterInstanceGroupPtrInput
   747  	// The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.
   748  	MasterPublicDns pulumi.StringPtrInput
   749  	// Name of the job flow.
   750  	Name pulumi.StringPtrInput
   751  	// The specified placement group configuration for an Amazon EMR cluster.
   752  	PlacementGroupConfigs ClusterPlacementGroupConfigArrayInput
   753  	// Release label for the Amazon EMR release.
   754  	ReleaseLabel pulumi.StringPtrInput
   755  	// Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized.
   756  	ScaleDownBehavior pulumi.StringPtrInput
   757  	// Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `releaseLabel` 4.8.0 or greater.
   758  	SecurityConfiguration pulumi.StringPtrInput
   759  	// IAM role that will be assumed by the Amazon EMR service to access AWS resources.
   760  	//
   761  	// The following arguments are optional:
   762  	ServiceRole pulumi.StringPtrInput
   763  	// Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with `releaseLabel` 5.28.0 or greater (default is 1).
   764  	StepConcurrencyLevel pulumi.IntPtrInput
   765  	// List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
   766  	Steps ClusterStepArrayInput
   767  	// list of tags to apply to the EMR Cluster. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   768  	Tags pulumi.StringMapInput
   769  	// Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   770  	//
   771  	// Deprecated: Please use `tags` instead.
   772  	TagsAll pulumi.StringMapInput
   773  	// Switch on/off termination protection (default is `false`, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to `false`.
   774  	TerminationProtection pulumi.BoolPtrInput
   775  	// Whether whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. Default value is `false`.
   776  	UnhealthyNodeReplacement pulumi.BoolPtrInput
   777  	// Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is `true`.
   778  	VisibleToAllUsers pulumi.BoolPtrInput
   779  }
   780  
   781  func (ClusterState) ElementType() reflect.Type {
   782  	return reflect.TypeOf((*clusterState)(nil)).Elem()
   783  }
   784  
   785  type clusterArgs struct {
   786  	// JSON string for selecting additional features such as adding proxy information. Note: Currently there is no API to retrieve the value of this argument after EMR cluster creation from provider, therefore the provider cannot detect drift from the actual EMR cluster if its value is changed outside the provider.
   787  	AdditionalInfo *string `pulumi:"additionalInfo"`
   788  	// A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html).
   789  	Applications []string `pulumi:"applications"`
   790  	// An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.
   791  	AutoTerminationPolicy *ClusterAutoTerminationPolicy `pulumi:"autoTerminationPolicy"`
   792  	// IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.
   793  	AutoscalingRole *string `pulumi:"autoscalingRole"`
   794  	// Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
   795  	BootstrapActions []ClusterBootstrapAction `pulumi:"bootstrapActions"`
   796  	// List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration. See [AWS Documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) for more information.
   797  	Configurations *string `pulumi:"configurations"`
   798  	// JSON string for supplying list of configurations for the EMR cluster.
   799  	//
   800  	// > **NOTE on `configurationsJson`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`.
   801  	//
   802  	// <!--Start PulumiCodeChooser -->
   803  	// ```go
   804  	// package main
   805  	//
   806  	// import (
   807  	// 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
   808  	// 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   809  	// )
   810  	//
   811  	// func main() {
   812  	// 	pulumi.Run(func(ctx *pulumi.Context) error {
   813  	// 		_, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
   814  	// 			ConfigurationsJson: pulumi.String(`[
   815  	// {
   816  	// "Classification": "hadoop-env",
   817  	// "Configurations": [
   818  	// {
   819  	// "Classification": "export",
   820  	// "Properties": {
   821  	// "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
   822  	// }
   823  	// }
   824  	// ],
   825  	// "Properties": {}
   826  	// }
   827  	// ]
   828  	// `),
   829  	// 		})
   830  	// 		if err != nil {
   831  	// 			return err
   832  	// 		}
   833  	// 		return nil
   834  	// 	})
   835  	// }
   836  	// ```
   837  	// <!--End PulumiCodeChooser -->
   838  	ConfigurationsJson *string `pulumi:"configurationsJson"`
   839  	// Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the core node type. Cannot be specified if any `coreInstanceGroup` configuration blocks are set. Detailed below.
   840  	CoreInstanceFleet *ClusterCoreInstanceFleet `pulumi:"coreInstanceFleet"`
   841  	// Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core).
   842  	CoreInstanceGroup *ClusterCoreInstanceGroup `pulumi:"coreInstanceGroup"`
   843  	// Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.
   844  	CustomAmiId *string `pulumi:"customAmiId"`
   845  	// Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.
   846  	EbsRootVolumeSize *int `pulumi:"ebsRootVolumeSize"`
   847  	// Attributes for the EC2 instances running the job flow. See below.
   848  	Ec2Attributes *ClusterEc2Attributes `pulumi:"ec2Attributes"`
   849  	// Switch on/off run cluster with no steps or when all steps are complete (default is on)
   850  	KeepJobFlowAliveWhenNoSteps *bool `pulumi:"keepJobFlowAliveWhenNoSteps"`
   851  	// Kerberos configuration for the cluster. See below.
   852  	KerberosAttributes *ClusterKerberosAttributes `pulumi:"kerberosAttributes"`
   853  	// List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps
   854  	ListStepsStates []string `pulumi:"listStepsStates"`
   855  	// AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
   856  	LogEncryptionKmsKeyId *string `pulumi:"logEncryptionKmsKeyId"`
   857  	// S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.
   858  	LogUri *string `pulumi:"logUri"`
   859  	// Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the master node type. Cannot be specified if any `masterInstanceGroup` configuration blocks are set. Detailed below.
   860  	MasterInstanceFleet *ClusterMasterInstanceFleet `pulumi:"masterInstanceFleet"`
   861  	// Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [master node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-master).
   862  	MasterInstanceGroup *ClusterMasterInstanceGroup `pulumi:"masterInstanceGroup"`
   863  	// Name of the job flow.
   864  	Name *string `pulumi:"name"`
   865  	// The specified placement group configuration for an Amazon EMR cluster.
   866  	PlacementGroupConfigs []ClusterPlacementGroupConfig `pulumi:"placementGroupConfigs"`
   867  	// Release label for the Amazon EMR release.
   868  	ReleaseLabel string `pulumi:"releaseLabel"`
   869  	// Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized.
   870  	ScaleDownBehavior *string `pulumi:"scaleDownBehavior"`
   871  	// Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `releaseLabel` 4.8.0 or greater.
   872  	SecurityConfiguration *string `pulumi:"securityConfiguration"`
   873  	// IAM role that will be assumed by the Amazon EMR service to access AWS resources.
   874  	//
   875  	// The following arguments are optional:
   876  	ServiceRole string `pulumi:"serviceRole"`
   877  	// Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with `releaseLabel` 5.28.0 or greater (default is 1).
   878  	StepConcurrencyLevel *int `pulumi:"stepConcurrencyLevel"`
   879  	// List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
   880  	Steps []ClusterStep `pulumi:"steps"`
   881  	// list of tags to apply to the EMR Cluster. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   882  	Tags map[string]string `pulumi:"tags"`
   883  	// Switch on/off termination protection (default is `false`, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to `false`.
   884  	TerminationProtection *bool `pulumi:"terminationProtection"`
   885  	// Whether whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. Default value is `false`.
   886  	UnhealthyNodeReplacement *bool `pulumi:"unhealthyNodeReplacement"`
   887  	// Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is `true`.
   888  	VisibleToAllUsers *bool `pulumi:"visibleToAllUsers"`
   889  }
   890  
   891  // The set of arguments for constructing a Cluster resource.
   892  type ClusterArgs struct {
   893  	// JSON string for selecting additional features such as adding proxy information. Note: Currently there is no API to retrieve the value of this argument after EMR cluster creation from provider, therefore the provider cannot detect drift from the actual EMR cluster if its value is changed outside the provider.
   894  	AdditionalInfo pulumi.StringPtrInput
   895  	// A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html).
   896  	Applications pulumi.StringArrayInput
   897  	// An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.
   898  	AutoTerminationPolicy ClusterAutoTerminationPolicyPtrInput
   899  	// IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.
   900  	AutoscalingRole pulumi.StringPtrInput
   901  	// Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
   902  	BootstrapActions ClusterBootstrapActionArrayInput
   903  	// List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration. See [AWS Documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) for more information.
   904  	Configurations pulumi.StringPtrInput
   905  	// JSON string for supplying list of configurations for the EMR cluster.
   906  	//
   907  	// > **NOTE on `configurationsJson`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`.
   908  	//
   909  	// <!--Start PulumiCodeChooser -->
   910  	// ```go
   911  	// package main
   912  	//
   913  	// import (
   914  	// 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
   915  	// 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   916  	// )
   917  	//
   918  	// func main() {
   919  	// 	pulumi.Run(func(ctx *pulumi.Context) error {
   920  	// 		_, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
   921  	// 			ConfigurationsJson: pulumi.String(`[
   922  	// {
   923  	// "Classification": "hadoop-env",
   924  	// "Configurations": [
   925  	// {
   926  	// "Classification": "export",
   927  	// "Properties": {
   928  	// "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
   929  	// }
   930  	// }
   931  	// ],
   932  	// "Properties": {}
   933  	// }
   934  	// ]
   935  	// `),
   936  	// 		})
   937  	// 		if err != nil {
   938  	// 			return err
   939  	// 		}
   940  	// 		return nil
   941  	// 	})
   942  	// }
   943  	// ```
   944  	// <!--End PulumiCodeChooser -->
   945  	ConfigurationsJson pulumi.StringPtrInput
   946  	// Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the core node type. Cannot be specified if any `coreInstanceGroup` configuration blocks are set. Detailed below.
   947  	CoreInstanceFleet ClusterCoreInstanceFleetPtrInput
   948  	// Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core).
   949  	CoreInstanceGroup ClusterCoreInstanceGroupPtrInput
   950  	// Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.
   951  	CustomAmiId pulumi.StringPtrInput
   952  	// Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.
   953  	EbsRootVolumeSize pulumi.IntPtrInput
   954  	// Attributes for the EC2 instances running the job flow. See below.
   955  	Ec2Attributes ClusterEc2AttributesPtrInput
   956  	// Switch on/off run cluster with no steps or when all steps are complete (default is on)
   957  	KeepJobFlowAliveWhenNoSteps pulumi.BoolPtrInput
   958  	// Kerberos configuration for the cluster. See below.
   959  	KerberosAttributes ClusterKerberosAttributesPtrInput
   960  	// List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps
   961  	ListStepsStates pulumi.StringArrayInput
   962  	// AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
   963  	LogEncryptionKmsKeyId pulumi.StringPtrInput
   964  	// S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.
   965  	LogUri pulumi.StringPtrInput
   966  	// Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the master node type. Cannot be specified if any `masterInstanceGroup` configuration blocks are set. Detailed below.
   967  	MasterInstanceFleet ClusterMasterInstanceFleetPtrInput
   968  	// Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [master node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-master).
   969  	MasterInstanceGroup ClusterMasterInstanceGroupPtrInput
   970  	// Name of the job flow.
   971  	Name pulumi.StringPtrInput
   972  	// The specified placement group configuration for an Amazon EMR cluster.
   973  	PlacementGroupConfigs ClusterPlacementGroupConfigArrayInput
   974  	// Release label for the Amazon EMR release.
   975  	ReleaseLabel pulumi.StringInput
   976  	// Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized.
   977  	ScaleDownBehavior pulumi.StringPtrInput
   978  	// Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `releaseLabel` 4.8.0 or greater.
   979  	SecurityConfiguration pulumi.StringPtrInput
   980  	// IAM role that will be assumed by the Amazon EMR service to access AWS resources.
   981  	//
   982  	// The following arguments are optional:
   983  	ServiceRole pulumi.StringInput
   984  	// Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with `releaseLabel` 5.28.0 or greater (default is 1).
   985  	StepConcurrencyLevel pulumi.IntPtrInput
   986  	// List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
   987  	Steps ClusterStepArrayInput
   988  	// list of tags to apply to the EMR Cluster. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   989  	Tags pulumi.StringMapInput
   990  	// Switch on/off termination protection (default is `false`, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to `false`.
   991  	TerminationProtection pulumi.BoolPtrInput
   992  	// Whether whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. Default value is `false`.
   993  	UnhealthyNodeReplacement pulumi.BoolPtrInput
   994  	// Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is `true`.
   995  	VisibleToAllUsers pulumi.BoolPtrInput
   996  }
   997  
   998  func (ClusterArgs) ElementType() reflect.Type {
   999  	return reflect.TypeOf((*clusterArgs)(nil)).Elem()
  1000  }
  1001  
  1002  type ClusterInput interface {
  1003  	pulumi.Input
  1004  
  1005  	ToClusterOutput() ClusterOutput
  1006  	ToClusterOutputWithContext(ctx context.Context) ClusterOutput
  1007  }
  1008  
  1009  func (*Cluster) ElementType() reflect.Type {
  1010  	return reflect.TypeOf((**Cluster)(nil)).Elem()
  1011  }
  1012  
  1013  func (i *Cluster) ToClusterOutput() ClusterOutput {
  1014  	return i.ToClusterOutputWithContext(context.Background())
  1015  }
  1016  
  1017  func (i *Cluster) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
  1018  	return pulumi.ToOutputWithContext(ctx, i).(ClusterOutput)
  1019  }
  1020  
  1021  // ClusterArrayInput is an input type that accepts ClusterArray and ClusterArrayOutput values.
  1022  // You can construct a concrete instance of `ClusterArrayInput` via:
  1023  //
  1024  //	ClusterArray{ ClusterArgs{...} }
  1025  type ClusterArrayInput interface {
  1026  	pulumi.Input
  1027  
  1028  	ToClusterArrayOutput() ClusterArrayOutput
  1029  	ToClusterArrayOutputWithContext(context.Context) ClusterArrayOutput
  1030  }
  1031  
  1032  type ClusterArray []ClusterInput
  1033  
  1034  func (ClusterArray) ElementType() reflect.Type {
  1035  	return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
  1036  }
  1037  
  1038  func (i ClusterArray) ToClusterArrayOutput() ClusterArrayOutput {
  1039  	return i.ToClusterArrayOutputWithContext(context.Background())
  1040  }
  1041  
  1042  func (i ClusterArray) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
  1043  	return pulumi.ToOutputWithContext(ctx, i).(ClusterArrayOutput)
  1044  }
  1045  
  1046  // ClusterMapInput is an input type that accepts ClusterMap and ClusterMapOutput values.
  1047  // You can construct a concrete instance of `ClusterMapInput` via:
  1048  //
  1049  //	ClusterMap{ "key": ClusterArgs{...} }
  1050  type ClusterMapInput interface {
  1051  	pulumi.Input
  1052  
  1053  	ToClusterMapOutput() ClusterMapOutput
  1054  	ToClusterMapOutputWithContext(context.Context) ClusterMapOutput
  1055  }
  1056  
  1057  type ClusterMap map[string]ClusterInput
  1058  
  1059  func (ClusterMap) ElementType() reflect.Type {
  1060  	return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
  1061  }
  1062  
  1063  func (i ClusterMap) ToClusterMapOutput() ClusterMapOutput {
  1064  	return i.ToClusterMapOutputWithContext(context.Background())
  1065  }
  1066  
  1067  func (i ClusterMap) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
  1068  	return pulumi.ToOutputWithContext(ctx, i).(ClusterMapOutput)
  1069  }
  1070  
  1071  type ClusterOutput struct{ *pulumi.OutputState }
  1072  
  1073  func (ClusterOutput) ElementType() reflect.Type {
  1074  	return reflect.TypeOf((**Cluster)(nil)).Elem()
  1075  }
  1076  
  1077  func (o ClusterOutput) ToClusterOutput() ClusterOutput {
  1078  	return o
  1079  }
  1080  
  1081  func (o ClusterOutput) ToClusterOutputWithContext(ctx context.Context) ClusterOutput {
  1082  	return o
  1083  }
  1084  
  1085  // JSON string for selecting additional features such as adding proxy information. Note: Currently there is no API to retrieve the value of this argument after EMR cluster creation from provider, therefore the provider cannot detect drift from the actual EMR cluster if its value is changed outside the provider.
  1086  func (o ClusterOutput) AdditionalInfo() pulumi.StringPtrOutput {
  1087  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.AdditionalInfo }).(pulumi.StringPtrOutput)
  1088  }
  1089  
  1090  // A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the [Amazon EMR Release Guide](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-release-components.html).
  1091  func (o ClusterOutput) Applications() pulumi.StringArrayOutput {
  1092  	return o.ApplyT(func(v *Cluster) pulumi.StringArrayOutput { return v.Applications }).(pulumi.StringArrayOutput)
  1093  }
  1094  
  1095  // ARN of the cluster.
  1096  func (o ClusterOutput) Arn() pulumi.StringOutput {
  1097  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
  1098  }
  1099  
  1100  // An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. See Auto Termination Policy Below.
  1101  func (o ClusterOutput) AutoTerminationPolicy() ClusterAutoTerminationPolicyPtrOutput {
  1102  	return o.ApplyT(func(v *Cluster) ClusterAutoTerminationPolicyPtrOutput { return v.AutoTerminationPolicy }).(ClusterAutoTerminationPolicyPtrOutput)
  1103  }
  1104  
  1105  // IAM role for automatic scaling policies. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate EC2 instances in an instance group.
  1106  func (o ClusterOutput) AutoscalingRole() pulumi.StringPtrOutput {
  1107  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.AutoscalingRole }).(pulumi.StringPtrOutput)
  1108  }
  1109  
  1110  // Ordered list of bootstrap actions that will be run before Hadoop is started on the cluster nodes. See below.
  1111  func (o ClusterOutput) BootstrapActions() ClusterBootstrapActionArrayOutput {
  1112  	return o.ApplyT(func(v *Cluster) ClusterBootstrapActionArrayOutput { return v.BootstrapActions }).(ClusterBootstrapActionArrayOutput)
  1113  }
  1114  
  1115  func (o ClusterOutput) ClusterState() pulumi.StringOutput {
  1116  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ClusterState }).(pulumi.StringOutput)
  1117  }
  1118  
  1119  // List of configurations supplied for the EMR cluster you are creating. Supply a configuration object for applications to override their default configuration. See [AWS Documentation](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps.html) for more information.
  1120  func (o ClusterOutput) Configurations() pulumi.StringPtrOutput {
  1121  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.Configurations }).(pulumi.StringPtrOutput)
  1122  }
  1123  
  1124  // JSON string for supplying list of configurations for the EMR cluster.
  1125  //
  1126  // > **NOTE on `configurationsJson`:** If the `Configurations` value is empty then you should skip the `Configurations` field instead of providing an empty list as a value, `"Configurations": []`.
  1127  //
  1128  // <!--Start PulumiCodeChooser -->
  1129  // ```go
  1130  // package main
  1131  //
  1132  // import (
  1133  //
  1134  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/emr"
  1135  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
  1136  //
  1137  // )
  1138  //
  1139  //	func main() {
  1140  //		pulumi.Run(func(ctx *pulumi.Context) error {
  1141  //			_, err := emr.NewCluster(ctx, "cluster", &emr.ClusterArgs{
  1142  //				ConfigurationsJson: pulumi.String(`[
  1143  //
  1144  // {
  1145  // "Classification": "hadoop-env",
  1146  // "Configurations": [
  1147  // {
  1148  // "Classification": "export",
  1149  // "Properties": {
  1150  // "JAVA_HOME": "/usr/lib/jvm/java-1.8.0"
  1151  // }
  1152  // }
  1153  // ],
  1154  // "Properties": {}
  1155  // }
  1156  // ]
  1157  // `),
  1158  //
  1159  //			})
  1160  //			if err != nil {
  1161  //				return err
  1162  //			}
  1163  //			return nil
  1164  //		})
  1165  //	}
  1166  //
  1167  // ```
  1168  // <!--End PulumiCodeChooser -->
  1169  func (o ClusterOutput) ConfigurationsJson() pulumi.StringPtrOutput {
  1170  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.ConfigurationsJson }).(pulumi.StringPtrOutput)
  1171  }
  1172  
  1173  // Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the core node type. Cannot be specified if any `coreInstanceGroup` configuration blocks are set. Detailed below.
  1174  func (o ClusterOutput) CoreInstanceFleet() ClusterCoreInstanceFleetOutput {
  1175  	return o.ApplyT(func(v *Cluster) ClusterCoreInstanceFleetOutput { return v.CoreInstanceFleet }).(ClusterCoreInstanceFleetOutput)
  1176  }
  1177  
  1178  // Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [core node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-core).
  1179  func (o ClusterOutput) CoreInstanceGroup() ClusterCoreInstanceGroupOutput {
  1180  	return o.ApplyT(func(v *Cluster) ClusterCoreInstanceGroupOutput { return v.CoreInstanceGroup }).(ClusterCoreInstanceGroupOutput)
  1181  }
  1182  
  1183  // Custom Amazon Linux AMI for the cluster (instead of an EMR-owned AMI). Available in Amazon EMR version 5.7.0 and later.
  1184  func (o ClusterOutput) CustomAmiId() pulumi.StringPtrOutput {
  1185  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.CustomAmiId }).(pulumi.StringPtrOutput)
  1186  }
  1187  
  1188  // Size in GiB of the EBS root device volume of the Linux AMI that is used for each EC2 instance. Available in Amazon EMR version 4.x and later.
  1189  func (o ClusterOutput) EbsRootVolumeSize() pulumi.IntPtrOutput {
  1190  	return o.ApplyT(func(v *Cluster) pulumi.IntPtrOutput { return v.EbsRootVolumeSize }).(pulumi.IntPtrOutput)
  1191  }
  1192  
  1193  // Attributes for the EC2 instances running the job flow. See below.
  1194  func (o ClusterOutput) Ec2Attributes() ClusterEc2AttributesPtrOutput {
  1195  	return o.ApplyT(func(v *Cluster) ClusterEc2AttributesPtrOutput { return v.Ec2Attributes }).(ClusterEc2AttributesPtrOutput)
  1196  }
  1197  
  1198  // Switch on/off run cluster with no steps or when all steps are complete (default is on)
  1199  func (o ClusterOutput) KeepJobFlowAliveWhenNoSteps() pulumi.BoolOutput {
  1200  	return o.ApplyT(func(v *Cluster) pulumi.BoolOutput { return v.KeepJobFlowAliveWhenNoSteps }).(pulumi.BoolOutput)
  1201  }
  1202  
  1203  // Kerberos configuration for the cluster. See below.
  1204  func (o ClusterOutput) KerberosAttributes() ClusterKerberosAttributesPtrOutput {
  1205  	return o.ApplyT(func(v *Cluster) ClusterKerberosAttributesPtrOutput { return v.KerberosAttributes }).(ClusterKerberosAttributesPtrOutput)
  1206  }
  1207  
  1208  // List of [step states](https://docs.aws.amazon.com/emr/latest/APIReference/API_StepStatus.html) used to filter returned steps
  1209  func (o ClusterOutput) ListStepsStates() pulumi.StringArrayOutput {
  1210  	return o.ApplyT(func(v *Cluster) pulumi.StringArrayOutput { return v.ListStepsStates }).(pulumi.StringArrayOutput)
  1211  }
  1212  
  1213  // AWS KMS customer master key (CMK) key ID or arn used for encrypting log files. This attribute is only available with EMR version 5.30.0 and later, excluding EMR 6.0.0.
  1214  func (o ClusterOutput) LogEncryptionKmsKeyId() pulumi.StringPtrOutput {
  1215  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.LogEncryptionKmsKeyId }).(pulumi.StringPtrOutput)
  1216  }
  1217  
  1218  // S3 bucket to write the log files of the job flow. If a value is not provided, logs are not created.
  1219  func (o ClusterOutput) LogUri() pulumi.StringPtrOutput {
  1220  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.LogUri }).(pulumi.StringPtrOutput)
  1221  }
  1222  
  1223  // Configuration block to use an [Instance Fleet](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html) for the master node type. Cannot be specified if any `masterInstanceGroup` configuration blocks are set. Detailed below.
  1224  func (o ClusterOutput) MasterInstanceFleet() ClusterMasterInstanceFleetOutput {
  1225  	return o.ApplyT(func(v *Cluster) ClusterMasterInstanceFleetOutput { return v.MasterInstanceFleet }).(ClusterMasterInstanceFleetOutput)
  1226  }
  1227  
  1228  // Configuration block to use an [Instance Group](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-group-configuration.html#emr-plan-instance-groups) for the [master node type](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-master-core-task-nodes.html#emr-plan-master).
  1229  func (o ClusterOutput) MasterInstanceGroup() ClusterMasterInstanceGroupOutput {
  1230  	return o.ApplyT(func(v *Cluster) ClusterMasterInstanceGroupOutput { return v.MasterInstanceGroup }).(ClusterMasterInstanceGroupOutput)
  1231  }
  1232  
  1233  // The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.
  1234  func (o ClusterOutput) MasterPublicDns() pulumi.StringOutput {
  1235  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.MasterPublicDns }).(pulumi.StringOutput)
  1236  }
  1237  
  1238  // Name of the job flow.
  1239  func (o ClusterOutput) Name() pulumi.StringOutput {
  1240  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
  1241  }
  1242  
  1243  // The specified placement group configuration for an Amazon EMR cluster.
  1244  func (o ClusterOutput) PlacementGroupConfigs() ClusterPlacementGroupConfigArrayOutput {
  1245  	return o.ApplyT(func(v *Cluster) ClusterPlacementGroupConfigArrayOutput { return v.PlacementGroupConfigs }).(ClusterPlacementGroupConfigArrayOutput)
  1246  }
  1247  
  1248  // Release label for the Amazon EMR release.
  1249  func (o ClusterOutput) ReleaseLabel() pulumi.StringOutput {
  1250  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ReleaseLabel }).(pulumi.StringOutput)
  1251  }
  1252  
  1253  // Way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an `instance group` is resized.
  1254  func (o ClusterOutput) ScaleDownBehavior() pulumi.StringOutput {
  1255  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ScaleDownBehavior }).(pulumi.StringOutput)
  1256  }
  1257  
  1258  // Security configuration name to attach to the EMR cluster. Only valid for EMR clusters with `releaseLabel` 4.8.0 or greater.
  1259  func (o ClusterOutput) SecurityConfiguration() pulumi.StringPtrOutput {
  1260  	return o.ApplyT(func(v *Cluster) pulumi.StringPtrOutput { return v.SecurityConfiguration }).(pulumi.StringPtrOutput)
  1261  }
  1262  
  1263  // IAM role that will be assumed by the Amazon EMR service to access AWS resources.
  1264  //
  1265  // The following arguments are optional:
  1266  func (o ClusterOutput) ServiceRole() pulumi.StringOutput {
  1267  	return o.ApplyT(func(v *Cluster) pulumi.StringOutput { return v.ServiceRole }).(pulumi.StringOutput)
  1268  }
  1269  
  1270  // Number of steps that can be executed concurrently. You can specify a maximum of 256 steps. Only valid for EMR clusters with `releaseLabel` 5.28.0 or greater (default is 1).
  1271  func (o ClusterOutput) StepConcurrencyLevel() pulumi.IntPtrOutput {
  1272  	return o.ApplyT(func(v *Cluster) pulumi.IntPtrOutput { return v.StepConcurrencyLevel }).(pulumi.IntPtrOutput)
  1273  }
  1274  
  1275  // List of steps to run when creating the cluster. See below. It is highly recommended to utilize the lifecycle resource options block with `ignoreChanges` if other steps are being managed outside of this provider.
  1276  func (o ClusterOutput) Steps() ClusterStepArrayOutput {
  1277  	return o.ApplyT(func(v *Cluster) ClusterStepArrayOutput { return v.Steps }).(ClusterStepArrayOutput)
  1278  }
  1279  
  1280  // list of tags to apply to the EMR Cluster. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
  1281  func (o ClusterOutput) Tags() pulumi.StringMapOutput {
  1282  	return o.ApplyT(func(v *Cluster) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
  1283  }
  1284  
  1285  // Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
  1286  //
  1287  // Deprecated: Please use `tags` instead.
  1288  func (o ClusterOutput) TagsAll() pulumi.StringMapOutput {
  1289  	return o.ApplyT(func(v *Cluster) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
  1290  }
  1291  
  1292  // Switch on/off termination protection (default is `false`, except when using multiple master nodes). Before attempting to destroy the resource when termination protection is enabled, this configuration must be applied with its value set to `false`.
  1293  func (o ClusterOutput) TerminationProtection() pulumi.BoolOutput {
  1294  	return o.ApplyT(func(v *Cluster) pulumi.BoolOutput { return v.TerminationProtection }).(pulumi.BoolOutput)
  1295  }
  1296  
  1297  // Whether whether Amazon EMR should gracefully replace core nodes that have degraded within the cluster. Default value is `false`.
  1298  func (o ClusterOutput) UnhealthyNodeReplacement() pulumi.BoolPtrOutput {
  1299  	return o.ApplyT(func(v *Cluster) pulumi.BoolPtrOutput { return v.UnhealthyNodeReplacement }).(pulumi.BoolPtrOutput)
  1300  }
  1301  
  1302  // Whether the job flow is visible to all IAM users of the AWS account associated with the job flow. Default value is `true`.
  1303  func (o ClusterOutput) VisibleToAllUsers() pulumi.BoolPtrOutput {
  1304  	return o.ApplyT(func(v *Cluster) pulumi.BoolPtrOutput { return v.VisibleToAllUsers }).(pulumi.BoolPtrOutput)
  1305  }
  1306  
  1307  type ClusterArrayOutput struct{ *pulumi.OutputState }
  1308  
  1309  func (ClusterArrayOutput) ElementType() reflect.Type {
  1310  	return reflect.TypeOf((*[]*Cluster)(nil)).Elem()
  1311  }
  1312  
  1313  func (o ClusterArrayOutput) ToClusterArrayOutput() ClusterArrayOutput {
  1314  	return o
  1315  }
  1316  
  1317  func (o ClusterArrayOutput) ToClusterArrayOutputWithContext(ctx context.Context) ClusterArrayOutput {
  1318  	return o
  1319  }
  1320  
  1321  func (o ClusterArrayOutput) Index(i pulumi.IntInput) ClusterOutput {
  1322  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Cluster {
  1323  		return vs[0].([]*Cluster)[vs[1].(int)]
  1324  	}).(ClusterOutput)
  1325  }
  1326  
  1327  type ClusterMapOutput struct{ *pulumi.OutputState }
  1328  
  1329  func (ClusterMapOutput) ElementType() reflect.Type {
  1330  	return reflect.TypeOf((*map[string]*Cluster)(nil)).Elem()
  1331  }
  1332  
  1333  func (o ClusterMapOutput) ToClusterMapOutput() ClusterMapOutput {
  1334  	return o
  1335  }
  1336  
  1337  func (o ClusterMapOutput) ToClusterMapOutputWithContext(ctx context.Context) ClusterMapOutput {
  1338  	return o
  1339  }
  1340  
  1341  func (o ClusterMapOutput) MapIndex(k pulumi.StringInput) ClusterOutput {
  1342  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Cluster {
  1343  		return vs[0].(map[string]*Cluster)[vs[1].(string)]
  1344  	}).(ClusterOutput)
  1345  }
  1346  
  1347  func init() {
  1348  	pulumi.RegisterInputType(reflect.TypeOf((*ClusterInput)(nil)).Elem(), &Cluster{})
  1349  	pulumi.RegisterInputType(reflect.TypeOf((*ClusterArrayInput)(nil)).Elem(), ClusterArray{})
  1350  	pulumi.RegisterInputType(reflect.TypeOf((*ClusterMapInput)(nil)).Elem(), ClusterMap{})
  1351  	pulumi.RegisterOutputType(ClusterOutput{})
  1352  	pulumi.RegisterOutputType(ClusterArrayOutput{})
  1353  	pulumi.RegisterOutputType(ClusterMapOutput{})
  1354  }