Skip to content

Commit e248c50

Browse files
authored
Add optional variable to transmit "depends_on" dependency (#15)
We're going to fix tests in a follow-up PR.
1 parent 68903da commit e248c50

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ Available targets:
212212
| kubernetes_version | Kubernetes version. Defaults to EKS Cluster Kubernetes version. Terraform will only perform drift detection if a configuration value is provided | string | `null` | no |
213213
| max_size | Maximum number of worker nodes | number | - | yes |
214214
| min_size | Minimum number of worker nodes | number | - | yes |
215+
| module_depends_on | Can be any value desired. Module will wait for this value to be computed before creating node group. | any | `null` | no |
215216
| name | Solution name, e.g. 'app' or 'cluster' | string | - | yes |
216217
| namespace | Namespace, which could be your organization name, e.g. 'eg' or 'cp' | string | `` | no |
217218
| source_security_group_ids | Set of EC2 Security Group IDs to allow SSH access (port 22) from on the worker nodes. If you specify `ec2_ssh_key`, but do not specify this configuration when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0) | list(string) | `<list>` | no |
@@ -292,6 +293,10 @@ We deliver 10x the value for a fraction of the cost of a full-time engineer. Our
292293

293294
Join our [Open Source Community][slack] on Slack. It's **FREE** for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build totally *sweet* infrastructure.
294295

296+
## Discourse Forums
297+
298+
Participate in our [Discourse Forums][discourse]. Here you'll find answers to commonly asked questions. Most questions will be related to the enormous number of projects we support on our GitHub. Come here to collaborate on answers, find solutions, and get ideas about the products and services we value. It only takes a minute to get started! Just sign in with SSO using your GitHub account.
299+
295300
## Newsletter
296301

297302
Sign up for [our newsletter][newsletter] that covers everything on our technology radar. Receive updates on what we're up to on GitHub as well as awesome new projects we discover.
@@ -405,6 +410,7 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply
405410
[testimonial]: https://cpco.io/leave-testimonial?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-eks-node-group&utm_content=testimonial
406411
[office_hours]: https://cloudposse.com/office-hours?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-eks-node-group&utm_content=office_hours
407412
[newsletter]: https://cpco.io/newsletter?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-eks-node-group&utm_content=newsletter
413+
[discourse]: https://ask.sweetops.com/?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-eks-node-group&utm_content=discourse
408414
[email]: https://cpco.io/email?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-eks-node-group&utm_content=email
409415
[commercial_support]: https://cpco.io/commercial-support?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-eks-node-group&utm_content=commercial_support
410416
[we_love_open_source]: https://cpco.io/we-love-open-source?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-eks-node-group&utm_content=we_love_open_source

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
| kubernetes_version | Kubernetes version. Defaults to EKS Cluster Kubernetes version. Terraform will only perform drift detection if a configuration value is provided | string | `null` | no |
2020
| max_size | Maximum number of worker nodes | number | - | yes |
2121
| min_size | Minimum number of worker nodes | number | - | yes |
22+
| module_depends_on | Can be any value desired. Module will wait for this value to be computed before creating node group. | any | `null` | no |
2223
| name | Solution name, e.g. 'app' or 'cluster' | string | - | yes |
2324
| namespace | Namespace, which could be your organization name, e.g. 'eg' or 'cp' | string | `` | no |
2425
| source_security_group_ids | Set of EC2 Security Group IDs to allow SSH access (port 22) from on the worker nodes. If you specify `ec2_ssh_key`, but do not specify this configuration when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0) | list(string) | `<list>` | no |

main.tf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ resource "aws_eks_node_group" "default" {
138138
aws_iam_role_policy_attachment.amazon_eks_worker_node_policy,
139139
aws_iam_role_policy_attachment.amazon_eks_worker_node_autoscaler_policy,
140140
aws_iam_role_policy_attachment.amazon_eks_cni_policy,
141-
aws_iam_role_policy_attachment.amazon_ec2_container_registry_read_only
141+
aws_iam_role_policy_attachment.amazon_ec2_container_registry_read_only,
142+
# Also allow calling module to create an explicit dependency
143+
# This is useful in conjunction with terraform-aws-eks-cluster to ensure
144+
# the cluster is fully created and configured before creating any node groups
145+
var.module_depends_on
142146
]
143147
}

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,9 @@ variable "source_security_group_ids" {
128128
default = []
129129
description = "Set of EC2 Security Group IDs to allow SSH access (port 22) from on the worker nodes. If you specify `ec2_ssh_key`, but do not specify this configuration when you create an EKS Node Group, port 22 on the worker nodes is opened to the Internet (0.0.0.0/0)"
130130
}
131+
132+
variable "module_depends_on" {
133+
type = any
134+
default = null
135+
description = "Can be any value desired. Module will wait for this value to be computed before creating node group."
136+
}

0 commit comments

Comments
 (0)