fix: Fixed launch_templates_with_managed_node_group example#1599
Conversation
remove `instance_type` in `aws_launch_template.default` to avoid this error:
```
│ Error: error creating EKS Node Group (test-eks-lt-URZJOIL1:test-eks-lt-URZJOIL1-example2021092307395969650000000f): InvalidRequestException: Cannot specify instance types in launch template and API request
│ {
│ RespMetadata: {
│ StatusCode: 400,
│ RequestID: "bece44af-e7e0-4931-9725-4fb57a7de031"
│ },
│ ClusterName: "test-eks-lt-URZJOIL1",
│ Message_: "Cannot specify instance types in launch template and API request",
│ NodegroupName: "test-eks-lt-URZJOIL1-example2021092307395969650000000f"
│ }
│
│ with module.eks.module.node_groups.aws_eks_node_group.workers["example"],
│ on ../../modules/node_groups/main.tf line 1, in resource "aws_eks_node_group" "workers":
│ 1: resource "aws_eks_node_group" "workers" {
```
replace it by `instance_types` in `node_groups` block of `module.eks`
add a `custom_suffix` in `aws_iam_service_linked_role.autoscaling` to avoid conflict like:
```
│ Error: Error creating service-linked role with name autoscaling.amazonaws.com: InvalidInput: Service role name AWSServiceRoleForAutoScaling has been taken in this account, please try a different suffix.
│ status code: 400, request id: e4ad4c1e-ad6e-4544-bed5-f3beeb148d29
│
│ with aws_iam_service_linked_role.autoscaling,
│ on disk_encryption_policy.tf line 2, in resource "aws_iam_service_linked_role" "autoscaling":
│ 2: resource "aws_iam_service_linked_role" "autoscaling" {
```
daroga0002
left a comment
There was a problem hiding this comment.
@PascalBourdier thank you for your contribution 🎉
@antonbabenko I have tested so this can be merged, I dont think here we need make a release as examples will be updated over master. I will try to review few more PRs and then we can consolidate few smaller PRs into release
|
@daroga0002 I agree, we can merge multiple PRs and release once. Let me know when you think you are done reviewing them. |
|
@antonbabenko @PascalBourdier see the result. But it works fine if I remove |
|
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. |
remove
instance_typeinaws_launch_template.defaultto avoid this error:replace it by
instance_typesinnode_groupsblock ofmodule.eksadd a
custom_suffixinaws_iam_service_linked_role.autoscalingto avoid conflict like:PR o'clock
Description
Please explain the changes you made here and link to any relevant issues.
Checklist