ine-labs / AWSGoat

AWSGoat : A Damn Vulnerable AWS Infrastructure
MIT License
1.7k stars 1.04k forks source link

tf apply & destroy & apply will have issues next time around regarding API_GATEWAY_URL #9

Closed mathiasconradt closed 2 years ago

mathiasconradt commented 2 years ago

I tried the manual installation (not via Github action) and it works fine, however, when you destroy the same project and re-apply it again, the frontend will point to the wrong (old / previous) API_GATEWAY_URL, as it has already been replaced in the first run, due to:

main.tf:
3624: sed -i "s,API_GATEWAY_URL,${aws_api_gateway_deployment.apideploy_ba.invoke_url},g" modules/module-1/resources/s3/webfiles/build/static/js/main.5e35cae6.js
3625: sed -i "s,API_GATEWAY_URL,${aws_api_gateway_deployment.apideploy_ba.invoke_url},g" modules/module-1/resources/s3/webfiles/build/static/js/main.5e35cae6.js.map

Just mentioning it here in case others are wondering about the same. Feel free to close if it's not intended to be used like this (destroyed and re-applie).

image

jeswinMathai commented 2 years ago

Thanks, Mathias, for pointing this out. We have updated the terraform script to handle the redeployment of the project. #12