Stack creation fails with "Attribute: PublicIp was not found for resource" when assignStaticIP parameter is "No"
elduds opened this issue · comments
Suggest adding a condition to the output eg.
DCVwebConsole:
Condition: useElasticIP
Description: DCV web console (login as ec2-user)
Value: !Sub "https://${ec2Instance.PublicIp}:${listenPort}"
Thanks for the report.
Stack creation fails as your EC2 is not provisioned in a public subnet, i.e. it does not have a public IP.
For EC2 in public subnet, assignStaticIP
provides option to associate a static internet IP via Elastic IP.
As per EC2 instance in private subnet, you can either remove or comment out the last 3 lines in yaml file.
Add displayPublicIP
CloudFormation parameter. Set this to No
if EC2 has no public IP.
Editing of template file is no longer required.