-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split aws_emr_cluster Resource instance_group Configuration Block Handling #8245
Comments
Removing the |
…_group configuration blocks, deprecate other instance group configuration methods Reference: #8245 Output from acceptance testing: ``` --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_AutoscalingPolicy (487.78s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_BidPrice (1006.42s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_InstanceCount (1004.90s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_InstanceType (869.47s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_Migration_CoreInstanceType (415.45s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_Migration_InstanceGroup (485.50s) --- PASS: TestAccAWSEMRCluster_CoreInstanceGroup_Name (769.30s) --- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_BidPrice (849.98s) --- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_InstanceType (756.42s) --- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_Migration_InstanceGroup (414.36s) --- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_Migration_MasterInstanceType (423.02s) --- PASS: TestAccAWSEMRCluster_MasterInstanceGroup_Name (735.58s) ```
This has been released in version 2.11.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Background
When creating and managing Amazon EMR clusters, there are three node types to consider:
Each of these node types has unique management requirements. For example, only one master node may be created and almost all changes to it require cluster replacement. Core nodes can have only one configuration with some additional flexibility but some changes still require cluster replacement. Task nodes are completely optional and changes do not require cluster replacement.
For each of the node types, there are two available configuration options:
Operator selection of instance fleet or instance group depends on use case. For example, instance fleet can be used to automatically provision from a list of instance types while instance group is a static instance type.
Historically, the Terraform AWS Provider
aws_emr_cluster
resource has implemented a single, monolithicinstance_group
configuration block attribute which aligns directly with theInstanceGroups
API parameter of theJobFlowInstancesConfig
API type. Instance fleet management in theaws_emr_cluster
resource has not been implemented. Theaws_emr_instance_group
resource is available to manage task nodes outside theaws_emr_cluster
resource.While the monolithic
instance_group
implementation is designed to offer most API options (e.g. EBS configuration) generically across all three instance group types, the flexibility comes at a price for the Terraform resource implementation and usability for Terraform operators:instance_group
configuration block uses aTypeSet
schema attribute type along with a nestedebs_config
configuration block. This type of schema is very complex to manage updates successfully and historically has presented operators with difficult to read/understand differences. Ignoring changes within theinstance_group
configuration is difficult as withTypeSet
attributes in general in Terraform. There are many configuration updates which currently present as recreating the cluster unnecessarily that are not easy to fix.Due to the above complexity, contributors and maintainers are hesitant to change the implementation to fix bugs or add enhancements.
Proposal
Split the monolithic
instance_group
configuration block into specific node type configuration blocks:master_instance_group
core_instance_group
task_instance_group
(To be determined in this proposal: these would still require complex update code due to the nestedebs_config
configuration block. It may be best to requireaws_emr_instance_group
usage.)Each of these will only contain relevant arguments and properly present cluster recreation. When instance fleet support is added to the resource, the schema can be augmented with
ConflictsWith
instead of additional code.The existing
instance_group
attribute will be deprecated via the Terraform Deprecation Best Practices section on provider attribute removal. The top level legacymaster_instance_type
,core_instance_count
, andcore_instance_type
arguments should also be deprecated and removed.A full writeup of the migration process should be documented in a AWS Provider Version 3 Upgrade Guide, similar to the Version 2 Upgrade Guide.
master_instance_group
core_instance_group
References
The text was updated successfully, but these errors were encountered: