Skip to content

tf apply fails if bastion is not enabled #3

@hhoover

Description

@hhoover

I think the bastion module needs a count to check var.bastion_host_enabled

│ Error: Invalid index
│ 
│   on .terraform/modules/vpc/main.tf line 138, in module "bastion":
│  138:   key_name                    = aws_key_pair.bastion[0].key_name
│     ├────────────────
│     │ aws_key_pair.bastion is empty tuple
│ 
│ The given key does not identify an element in this collection value: the collection has no elements.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions