Skip to content

Commit

Permalink
Merge pull request #20532 from hashicorp/b-eks-node-group-instance-types
Browse files Browse the repository at this point in the history
r/eks_node_group: change `instance_types` back to a TypeSet since it supports multiple values
  • Loading branch information
anGie44 authored Aug 12, 2021
2 parents 5ebf3c2 + eff2775 commit 034c828
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions aws/resource_aws_eks_node_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func resourceAwsEksNodeGroup() *schema.Resource {
Optional: true,
},
"instance_types": {
Type: schema.TypeList,
Type: schema.TypeSet,
Optional: true,
Computed: true,
ForceNew: true,
Expand Down Expand Up @@ -285,8 +285,8 @@ func resourceAwsEksNodeGroupCreate(ctx context.Context, d *schema.ResourceData,
input.DiskSize = aws.Int64(int64(v.(int)))
}

if v := d.Get("instance_types").([]interface{}); len(v) > 0 {
input.InstanceTypes = expandStringList(v)
if v := d.Get("instance_types").(*schema.Set); v.Len() > 0 {
input.InstanceTypes = expandStringSet(v)
}

if v := d.Get("labels").(map[string]interface{}); len(v) > 0 {
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/eks_node_group.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ The following arguments are optional:
* `capacity_type` - (Optional) Type of capacity associated with the EKS Node Group. Valid values: `ON_DEMAND`, `SPOT`. Terraform will only perform drift detection if a configuration value is provided.
* `disk_size` - (Optional) Disk size in GiB for worker nodes. Defaults to `20`. Terraform will only perform drift detection if a configuration value is provided.
* `force_update_version` - (Optional) Force version update if existing pods are unable to be drained due to a pod disruption budget issue.
* `instance_types` - (Optional) List of instance types associated with the EKS Node Group. Defaults to `["t3.medium"]`. Terraform will only perform drift detection if a configuration value is provided.
* `instance_types` - (Optional) Set of instance types associated with the EKS Node Group. Defaults to `["t3.medium"]`. Terraform will only perform drift detection if a configuration value is provided.
* `labels` - (Optional) Key-value map of Kubernetes labels. Only labels that are applied with the EKS API are managed by this argument. Other Kubernetes labels applied to the EKS Node Group will not be managed.
* `launch_template` - (Optional) Configuration block with Launch Template settings. Detailed below.
* `node_group_name` – (Optional) Name of the EKS Node Group. If omitted, Terraform will assign a random, unique name. Conflicts with `node_group_name_prefix`.
Expand Down

0 comments on commit 034c828

Please sign in to comment.