Terraform-provider-aws: elasticbeanstalk.environment creates loadbalanced instead of singleinstance

Created on 27 Dec 2017  ยท  4Comments  ยท  Source: hashicorp/terraform-provider-aws

Hi there,

I'm trying to create SingleInstance elasticbeanstalk environment, but whatever I do it is being created as LoadBalanced one, not as SingleInstance.
I'm defining the following settings for the elasticbeanstalk environment:

setting {
    namespace = "aws:ec2:vpc"
    name      = "VPCId"
    value     = "${var.vpc_id}"
  }
  setting {
    namespace = "aws:ec2:vpc"
    name      = "Subnets"
    value     = "${join(",", var.subnets)}"
  }
setting {
    namespace = "aws:autoscaling:launchconfiguration"
    name      = "IamInstanceProfile"
    value     = "${aws_iam_instance_profile.iam_instance_profile.name}"
  }
  setting {
    namespace = "aws:elasticbeanstalk:environment"
    name      = "ServiceRole"
    value     = "${aws_iam_role.iam_role_beanstalk_service.name}"
  }
  setting {
    namespace = "aws:elasticbeanstalk:application:environment"
    name      = "EnvironmentType"
    value     = "${var.env_type}"
  }
  setting {
    namespace = "aws:elasticbeanstalk:application:environment"
    name      = "environment"
    value     = "${var.stack_id}"
  }
  setting {
    namespace = "aws:autoscaling:launchconfiguration"
    name      = "SecurityGroups"
    value     = "${aws_security_group.sg_app.id}"
  }
  setting {
    namespace = "aws:autoscaling:launchconfiguration"
    name      = "InstanceType"
    value     = "${var.asg_instance_type}"
  }
  setting {
    namespace = "aws:autoscaling:launchconfiguration"
    name      = "EC2KeyName"
    value     = "${var.asg_keypair}"
  }
  setting {
    namespace = "aws:autoscaling:asg"
    name      = "MinSize"
    value     = "${var.asg_size_min}"
  }
  setting {
    namespace = "aws:autoscaling:asg"
    name      = "MaxSize"
    value     = "${var.asg_size_min}"
  }
  setting {
    namespace = "aws:autoscaling:asg"
    name      = "Availability Zones"
    value     = "${var.asg_zones}"
  }
  setting {
    namespace = "aws:elasticbeanstalk:application"
    name      = "Application Healthcheck URL"
    value     = "/"
  }

Terraform Version

I'm running the latest stable terraform version, i.e. 0.11.1

Affected Resource(s)

  • aws_elastic_beanstalk_environment

Debug Output

https://gist.github.com/iershovnsk/370b00470c2821a8096ad5f8fc676537

Expected Behavior

ElasticBeanStalk SingleInstance environment should be created

Actual Behavior

ElasticBeanStalk LoadBalanced environment is created

Steps to Reproduce

Define the SingleInstance environment with the mentioned settings and run terraform apply, check which type of stack is being created

Important Factoids

I'm creating the stack in custom VPC in public subnet of it.

References

I haven't found the ones so far

bug servicelasticbeanstalk stale

Most helpful comment

Per my investigation, it seems that you need to use a different namespace

namespace = "aws:elasticbeanstalk:environment"
name      = "EnvironmentType"

instead of

namespace = "aws:elasticbeanstalk:application:environment"
name      = "EnvironmentType"

All 4 comments

Per my investigation, it seems that you need to use a different namespace

namespace = "aws:elasticbeanstalk:environment"
name      = "EnvironmentType"

instead of

namespace = "aws:elasticbeanstalk:application:environment"
name      = "EnvironmentType"

We are having the same issue using value "SingleInstance" but still we get an Elastic Beanstalk environment with a Load Balancer.

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

darrenhaken picture darrenhaken  ยท  36Comments

marcincuber picture marcincuber  ยท  39Comments

oarmstrong picture oarmstrong  ยท  44Comments

Bwanabanana picture Bwanabanana  ยท  46Comments

charles-at-geospock picture charles-at-geospock  ยท  44Comments