Skip to content
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

feat: Add support for autoscaling group AMI override #1501

Conversation

GaruGaru
Copy link

@GaruGaru GaruGaru commented Jul 27, 2021

PR o'clock

Description

Resolves #1498
Allow users to specify different AMIs based on the instance type ( more details in #1498 )

Since aws has introduced eks support for arm instances the module should also support the creation of asg with mixed instance type (arm64, x64).

The suggested way to implement this feature is to create multiple launchtemplates and overriding the default launch template with a specific one related to the instance type.

Example

module "eks" {
  ...
  worker_groups_launch_template = [
    {
      name = "spot-1"
      override_instance_types = [
        "m5.large",
        "t4g.medium"
      ]
      override_instance_ami = {
        "t4g.medium" : "<custom_ami>"
      }
    },
  ]
}

This change introduce more complexity in the aws_launch_template creation since we now have to create multiple aws_launch_template for the same aws_autoscaling_group if override_instance_ami is specified.

In order to avoid the duplication of aws_launch_template.workers_launch_template the resource is not created using a for_each which creates a launch template for every node group * n. of specified overrides,
Ideas to reduce the complexity of the features are welcome.

Checklist

@AndriiBarabash
Copy link
Contributor

Related PR - #1473

@stale
Copy link

stale bot commented Oct 7, 2021

This PR has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
To track this PR (even if closed), please open a corresponding issue if one does not already exist.

@stale stale bot added the stale label Oct 7, 2021
@stale
Copy link

stale bot commented Oct 14, 2021

This PR has been automatically closed because it has not had recent activity since being marked as stale.
Please reopen when work resumes.

@stale stale bot closed this Oct 14, 2021
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for autoscaling group AMI override
2 participants