ine-labs / AWSGoat

AWSGoat : A Damn Vulnerable AWS Infrastructure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

mathiasconradt opened this issue · comments

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

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