ava-labs/avalanche-ops

CloudFormation template fails if ssh keys are disabled

exdx opened this issue · 1 comments

exdx commented

Using the apply command without enable_ssh set resulted in an error when creating the CloudFormation template here

.

I believe because creating the ec2 keys are now gated behind whether the flag is set, but the template expects them to exist regardless.

exdx commented

Need to add a condition to this block: https://github.com/ava-labs/avalanche-ops/blob/main/avalanche-ops/src/aws/cfn-templates/asg_ubuntu.yaml#L529

We can use similar logic to the NLB:

NlbEnabledTrue:
Fn::Equals:
- Ref: NlbEnabled
- "true"
NlbTargetGroupArnEmpty:
Fn::Equals:
- Ref: NlbTargetGroupArn
- ""