2

Generally you can do it with --query filter. If you need the private IP address only: aws --region YOUR-AWS-REGION \ ec2 describe-instances \ --filters \ "Name=instance-state-name,Values=running" \ "Name=instance-id,Values=i-00914683ababcba7eb1" \ --query 'Reservations[*].Instances[*].[PrivateIpAddress]' \ --output text If you need the public ip address ...


2

If you want to terminate SSL/TLS connection on the web servers (and not on the LB(s) ) you can set LB to balance TCP connection and not SSL/TLS. Of cource this have some disadvantages but based on your requirements this seems to be the only way. BTW if you have only one web server/service it is strange for me you want to balance it. LB is normally applied ...


1

SCP is over SSH - so if you know how to log into your instance using SSH then that's half the battle the -i keyword is a path to your private keyfile, not the file you want to upload, which should be in /Users/myname/.ssh/id_rsa where "myname" is your account. how do you normally access the VM over SSH? You will use those creds with scp EDIT BASED ON ...


1

if you are inside the resource you are trying to execute you can just use: ${rsadecrypt(self.password_data,file("path"))} If you are outside you will have to loop over the array. In terraform >12 output "Administrator_Password" { value = [ for g in aws_instance.example : rsadecrypt(g.password_data,file("path")) ] }


1

A little improved version of that of @urjit: aws ec2 describe-spot-instance-requests \ --filters Name=instance-id,Values="$(wget -q -O - http://169.254.169.254/latest/meta-data/instance-id)" \ --region "$(wget -q -O - http://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/.$//')" | \ jq -r '.SpotInstanceRequests | if length > ...


Only top voted, non community-wiki answers of a minimum length are eligible