Cluster EMR - Security group AWS

31 views Asked by At

I'm about to try to create a terraform for deploy a cluster spark on AWS

I'v received an error after do terraform apply that concern the security group in public subnet :

"Error: waiting for EMR Cluster (j-3F9NTKPDFH0IN) to create: unexpected state 'TERMINATED_WITH_ERRORS', wanted target 'RUNNING, WAITING'. last error: VALIDATION_ERROR: Amazon EC2 permissions error when configuring required rules on securityGroup sg-XXXXXXXX"

I don't know how to settle my security group.

Could someone help me please?

Thanks!

Sorry for my english

  #Security groups
resource "aws_security_group" "sparkm_security_group" {
  name        = "sg_master"
  description = "spark_security_group_master"

  ingress {
    from_port   = 0
    to_port     = 8443
    protocol    = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }
}

resource "aws_security_group" "sparkc_security_group" {
  name        = "sg_core"
  description = "spark_security_group_core"

  ingress {
    from_port   = 0
    to_port     = 8443
    protocol    = "tcp"
    cidr_blocks = ["0.0.0.0/0"]
  }
}

I'd try to read the documentation : https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-man-sec-groups.html#emr-sg-elasticmapreduce-master. But didn't find a clear answer.

0

There are 0 answers