aws-security-group

AWS RDS keep user access with dynamic IP

匆匆过客 提交于 2021-02-11 14:15:12
问题 On AWS rds I added few postgres users. There is Security groups which needs IP addresses for access to DB instance right? So if user have static IP address, then I will add that once and there is no problem. But if user have dynamic address, only way I see is that periodically update IP's for keep users valid connections. My question is: if there is possible to keep dynamic IP users valid connections, without manually update security group data ? Thanks ! 回答1: Following are some of the

Cannot connect to an open port ec2 instance

三世轮回 提交于 2021-01-29 10:25:56
问题 I am trying to connect to a redis server hosted on AWS. I used my private key to ssh into the instance, install and run the server. Now I wanted to access the server using the public dns of the instance and the port 6379 (on which the server is running). I have added the port 6379 to security group with 0.0.0.0/0 and ::/0 but when I telnet on this port, I get: Trying [PUBLIC-DNS]... telnet: connect to address [PUBLIC-DNS]: Connection refused telnet: Unable to connect to remote host Any help

AWS security group that allows instances within VPC to connect doesn't work over public IP

﹥>﹥吖頭↗ 提交于 2021-01-29 07:43:50
问题 I have a VPC set up in AWS and have a security group that allows inbound connections from the VPC's CIDR block and have assigned it to my instances. SSH and TCP work fine while using the private IP addresses. However when using public ip addresses on an instance, connection fails. Why is that so? Why doesn't the security group know the connection is coming from within VPC even if it's addressed to the public IP? 回答1: When you use the public IP the traffic exits the VPC and enters back into

How do I create a AWS security group and use it in different .tf files?

戏子无情 提交于 2020-08-10 20:01:10
问题 As the title says, if I'm using terraform/aws/layers/bastion/main.tf to create an EC2 instance, I know I can also create a security group within this same main.tf file for the bastion instance to use, but what if I wanted to create a security group that can be used in a different file? For example, if terraform/aws/layers/worker/main.tf needed to use the same security group as bastion/main.tf how would I go about this? bastion/main.tf provider "aws" { region = var.region } resource "aws

Terraform config isn't using output from other file for already created resource, instead tries to recreate it and fails (security group id)

只愿长相守 提交于 2020-07-23 06:53:05
问题 In terraform/aws/global/vpc/security_groups.tf I have the below code to create my bastion security group, and the output.tf file as well which is below. But in terraform/aws/layers/bastion/main.tf (code also below) I reference that security group as I need its security group ID to create my EC2 instance, the issue I have is that rather than getting the ID from the already existing security group created by the /vpc/security_groups.tf config it tries to create the whole security group and the

Terraform config isn't using output from other file for already created resource, instead tries to recreate it and fails (security group id)

为君一笑 提交于 2020-07-23 06:51:17
问题 In terraform/aws/global/vpc/security_groups.tf I have the below code to create my bastion security group, and the output.tf file as well which is below. But in terraform/aws/layers/bastion/main.tf (code also below) I reference that security group as I need its security group ID to create my EC2 instance, the issue I have is that rather than getting the ID from the already existing security group created by the /vpc/security_groups.tf config it tries to create the whole security group and the

Terraform - Use security group ID created in separate file for EC2 instance creation

你离开我真会死。 提交于 2020-07-22 05:42:12
问题 I have used this module to create a security group in AWS VPC. How do I reference the resource created from this in a separate file? I am creating our bastion instance in a separate directory in the same repo. My bastion config looks like the following, uses the Terraform EC2 module and works if I hard code the vpc security group ID, but I want it to be able to take it directly from when the security group is created as this could change in the future.. terraform/aws/layers/bastion/main.tf