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

Request use of AWS Elastic IP support #223

Open
kevinayres opened this issue Aug 4, 2023 · 1 comment
Open

Request use of AWS Elastic IP support #223

kevinayres opened this issue Aug 4, 2023 · 1 comment

Comments

@kevinayres
Copy link

kevinayres commented Aug 4, 2023

Issue: By using a public IP (not EIP), things like Nginx are bound to that temporary IP. If you shutdown/start the instance, you get a different IP resulting in 'bad gateway' when accessing the API.

One way this project could be even more helpful would be to support EIP on deployment. Example:

  • Deploy neuvector/aws with option for EIP.
  • EIP is created and associated with the instance.
  • Then able to add example workloads, configure policies, and build out a nice demo environment.
  • Can then shut down the instance to stay under budget. Instance size can be altered, etc.
  • Instance can be restarted fully intact for the customer/partner demo.
@kevinayres
Copy link
Author

kevinayres commented Aug 5, 2023

This works for creating the instance, EIP, association:

Providers

provider "aws" {
profile = "default"
}

Variable Declarations

variable "ami-sles15sp5payg" {
type = string
default = "ami-0aa3dc9f3f70b91a7" #AMI for us-west-1
}

variable "key-name" {
type = string
default = "access"
}

Create EC2 instance

resource "aws_instance" "demo-instance" {
ami = var.ami-sles15sp5payg
instance_type = "t2.micro"
key_name = var.key-name
}

Resource block for eip

resource "aws_eip" "demo-1" {
vpc = true
}

Associate the EIP

resource "aws_eip" "demo-2" {
instance = aws_instance.demo-instance.id
vpc = true
}
`

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