Terrafrom for the Bastion AWS and configuration of ASG with EIP assigning

Hi there,
I built the Terraform code for the Bastion AWS and configuration of ASG with EIP assigning; however, my Elastic IP doesn’t want to be assigned after the termination or reset of the Bastion (Ec2) instance. If anyone has this experience, I will be glad to talk and share my code.

Hello

I assume you’re not showing the entire infrastructure here. I assume the following

  • Because you have NAT gateways, there are private subnets not shown that need access to the internet
  • The EIP should be associated with the bastion, correct?
  • The bastion would allow you to jump to instances in private subnets

It would help if you shared the terraform code - at least enough of it to show the creation of everything up to and including the EIP and bastion. Link to github would be best if that is where it is.

1 Like

Good day, Alistair.
Thank you for your thoughts. Here is the link > git

I am debugging it.
Bear with me.

1 Like

Hi @idyakov

I fixed it.

You tried to do this 3 years ago and only came back to it now :wink: ?

1 Like

Good morning Alistair, thank you so much for your correction. This is the best. I forgot about this retrievements ID file (from http://169.254.169.254/latest…). Yeah, I need to update my projects for my job purposes.