dandi / dandi-hub

Infrastructure and code for the dandihub
https://hub.dandiarchive.org
Other
11 stars 23 forks source link

[do-eks] ./cleanup.sh failed #151

Closed asmacdo closed 4 months ago

asmacdo commented 7 months ago
│ Error: Invalid index
│
│   on .terraform/modules/eks/main.tf line 163, in locals:
│  163:   cluster_security_group_id = local.create_cluster_sg ? aws_security_group.cluster[0].id : var.cluster_security_group_id
│     ├────────────────
│     │ aws_security_group.cluster is empty tuple
│
│ The given key does not identify an element in this collection value: the collection has no elements.
╵
╷
│ Error: Invalid index
│
│   on .terraform/modules/eks/node_groups.tf line 91, in locals:
│   91:   node_security_group_id = local.create_node_sg ? aws_security_group.node[0].id : var.node_security_group_id
│     ├────────────────
│     │ aws_security_group.node is empty tuple
│
│ The given key does not identify an element in this collection value: the collection has no elements.
╵

The error doesn't look familiar to me, maybe there was an upstream change in the eks module?

In the meantime, I manually deleted the eks cluster via Amazon console, so we'll have to finish the cleanup manually, and bring it back up to reproduce.

asmacdo commented 5 months ago

Hit this again this morning, and I had more time to have a look. We weren't reading in the vars, which we dont need for the most part...except for region, which worked previously because I was operating on the default value.

Anyway, this should fix it whenever we merge that work back here https://github.com/brain-bican/kbhub/pull/1/commits/0c5a6399160d1c5b16e0e695bc1b2c7708205cfb

asmacdo commented 4 months ago

Fixed by https://github.com/dandi/dandi-hub/pull/162/commits/b2b7b5bf613d2f45bbf6b3edcb532b6244967c0c