imperva / imperva/dsfkit

DRA Admin public IP address

Open
#403 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HCL
Stars
7
Forks
11
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading examples/aws/installation/dsf_single_account_deployment/.terraform/modules/dra_admin/main.tf and the corresponding dra_analytics/main.tf, then inspect each module's readiness.tftpl. Verify how private_ip and public_ip are selected and how the Elastic IP is configured. Done means an option can disable the public IP and readiness checks use the private address first, with public fallback when needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
terraform
Domain
cloud, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.