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 = "/"
}
I'm running the latest stable terraform version, i.e. 0.11.1
https://gist.github.com/iershovnsk/370b00470c2821a8096ad5f8fc676537
ElasticBeanStalk SingleInstance environment should be created
ElasticBeanStalk LoadBalanced environment is created
Define the SingleInstance environment with the mentioned settings and run terraform apply, check which type of stack is being created
I'm creating the stack in custom VPC in public subnet of it.
I haven't found the ones so far
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!
Most helpful comment
Per my investigation, it seems that you need to use a different namespace
instead of