Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRA Admin public IP address #403

Open
06212 opened this issue Apr 8, 2024 · 0 comments
Open

DRA Admin public IP address #403

06212 opened this issue Apr 8, 2024 · 0 comments

Comments

@06212
Copy link

06212 commented Apr 8, 2024

Hello Imperva,

I would like to draw your attention to the following use case:

1 The current Terraform code in the DRA Admin module spins up a machine with a public IP address. My first question is whether it’s possible to modify the code to include an option to disable the Elastic IP address.
Additionally, during the execution of the script for the DRA Admin and DRA Analytics modules, it attempts to connect to the application via the public IP address from the deployment machine.

module.dra_admin[0].null_resource.readiness (local-exec): Executing: ["/bin/bash" "-c" " while true; do\n response=$(curl -k -s -o /dev/null -w \"%{http_code}\" --request GET 'https://3.13.11.65:8443/mvc/login')\n if [ $response -eq 200 ]; then\n exit 0\n else\n sleep 60\n fi\n done"] module.dra_analytics[0].null_resource.readiness (local-exec): Executing: ["/bin/bash" "-c" " while true; do\n response=$(curl -k -s -o /dev/null -w \"%{http_code}\" --request GET 'https://3.13.11.65:8443/mvc/login')\n if [ $response -eq 200 ]; then\n exit 0\n else\n sleep 60\n fi\n done"]

2 If there is no specific reason for the current setup, may I suggest altering the code so that the script attempts to connect to the respective DRA component via its private IP address first, and then, if necessary, via its public IP address?

examples/aws/installation/dsf_single_account_deployment/.terraform/modules/dra_admin/main.tf
readiness_script = templatefile("${path.module}/readiness.tftpl", { admin_server_public_ip = try(local.private_ip,local.public_ip,) })

examples/aws/installation/dsf_single_account_deployment/.terraform/modules/dra_analytics/main.tf
readiness_script = templatefile("${path.module}/readiness.tftpl", { admin_server_public_ip = try(var.admin_server_private_ip, var.admin_server_public_ip,) })

Thank you for reviewing my submission. Please let me know your thoughts.

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

No branches or pull requests

1 participant