Skip to content

Add dependson to alb#149

Open
hqtan wants to merge 2 commits intoacantril:masterfrom
hqtan:add-dependson-to-alb
Open

Add dependson to alb#149
hqtan wants to merge 2 commits intoacantril:masterfrom
hqtan:add-dependson-to-alb

Conversation

@hqtan
Copy link

@hqtan hqtan commented Aug 28, 2023

Purpose of PR

This PR proposes a fix to an issue that was reported in slack:
https://techstudyslack.slack.com/archives/C010173PTGU/p1693031828964669

The issue was encountered during deployment of ALBSTICKINESS.yaml stack, with the following error message:

VPC has no internet gateway (Service: AmazonElasticLoadBalancing; Status Code: 400; Error Code: InvalidSubnet

the ALB resource in the stack fails to deploy, because the InternetGatewayAttachment resource wasn't being created before the ALB resource.

Proposed fix to issue

The proposed fix to this issue is to add a DependsOn: InternetGatewayAttachment attribute to the ALB resource to add InternetGatewayAttachment resource as a dependency for ALB resource.

N.B:
Also included a minor improvement to stack template, suggested by cfn-lint tool, to remove the use of !Sub intrinsic function from UserData attribute in WEBLaunchTemplate resource.

hqtan added 2 commits August 28, 2023 11:26
apply a `cfn-lint` suggestion: 
```
W1020 Fn::Sub isn't needed because there are no variables at Resources/WEBLaunchTemplate/Properties/LaunchTemplateData/UserData/Fn::Base64/Fn::Sub
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants