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

aws_elastic_beanstalk_environment not working with some regions #10667

Closed
hd-deman opened this issue Dec 12, 2016 · 6 comments
Closed

aws_elastic_beanstalk_environment not working with some regions #10667

hd-deman opened this issue Dec 12, 2016 · 6 comments

Comments

@hd-deman
Copy link

It successfully applied in us-east-1 and eu-west-1 but always fails in eu-central-1 and ap-northeast-2 with:

* aws_elastic_beanstalk_environment.test-eb-staging: Error waiting for Elastic Beanstalk Environment (e-sxusumwivg) to become ready: unexpected state 'Terminated', wanted target 'Ready'. last error: %!s(<nil>)
2016/12/12 16:26:37 [ERROR] root: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* aws_elastic_beanstalk_environment.test-eb-staging: Error waiting for Elastic Beanstalk Environment (e-sxusumwivg) to become ready: unexpected state 'Terminated', wanted target 'Ready'. last error: %!s(<nil>)
2016/12/12 16:26:37 [ERROR] Shadow graph error: 1 error(s) occurred:

* aws_elastic_beanstalk_environment.test-eb-staging: Error waiting for Elastic Beanstalk Environment (e-sxusumwivg) to become ready: unexpected state 'Terminated', wanted target 'Ready'. last error: %!s(<nil>)
Error applying plan:

2016/12/12 16:26:37 [DEBUG] plugin: waiting for all plugin processes to complete...
1 error(s) occurred:

* aws_elastic_beanstalk_environment.test-eb-staging: Error waiting for Elastic Beanstalk Environment (e-sxusumwivg) to become ready: unexpected state 'Terminated', wanted target 'Ready'. last error: %!s(<nil>)

Terraform Version

tested on 0.8.0-rc3 and 0.7.13

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_elastic_beanstalk_application
  • aws_elastic_beanstalk_environment

Terraform Configuration Files

resource "aws_elastic_beanstalk_application" "test-eb" {
  name = "test-eb"
  description = "created by terraform"
}

resource "aws_elastic_beanstalk_environment" "test-eb-staging" {
  name = "test-eb-staging"
  application = "${aws_elastic_beanstalk_application.test-eb.name}"
  solution_stack_name = "64bit Amazon Linux 2016.09 v2.2.0 running Docker 1.11.2"
}

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

region eu-central-1 or ap-northeast-2

@nekonyuu
Copy link

Confirming this, i'm getting the same trace with eu-west-2 too.

@dharrisio
Copy link
Contributor

From the Elastic Beanstalk console, I see the following error message when trying to create an environment in eu-central-1:

Environment must have instance profile associated with it.

Updating the file to this fixes the issue. (assuming the iam instance profile already exists)

provider "aws" {
  region = "eu-central-1"
}

resource "aws_elastic_beanstalk_application" "test-eb" {
  name        = "test-eb"
  description = "created by terraform"
}

resource "aws_elastic_beanstalk_environment" "test-eb-staging" {
  name                = "test-eb-staging"
  application         = "${aws_elastic_beanstalk_application.test-eb.name}"
  solution_stack_name = "64bit Amazon Linux 2016.09 v2.5.0 running Docker 1.12.6"

  setting {
    namespace = "aws:autoscaling:launchconfiguration"
    name      = "IamInstanceProfile"
    value     = "aws-elasticbeanstalk-ec2-role "
  }
}

This error should be returned in Terraform, but an error is returned before it collects any of the errors from the Elastic Beanstalk Environment. I'll submit a PR to fix that, and hopefully make failures like this more obvious in the future.

@auasad
Copy link

auasad commented Nov 7, 2018

aws_elastic_beanstalk_environment.app-prod: InvalidParameterValue: No Solution Stack named '64bit Amazon Linux 2018.03 v2.8.4 running Ruby 2.5 (Puma)' found.
status code: 400, request id: f4e5a330-c1af-43de-94b7-cb1067a28e5e
Can anyone guide me, I am getting this error. From my laptop when I do terraform apply it works and the complete environment is created but from other laptop same OS(Ubuntu) when I try it gives me the above error.
I also tried to remove the terraform.tfstate and terraform.tfstate.backup but it give me the same error.

@hd-deman
Copy link
Author

hd-deman commented Nov 7, 2018 via email

@hd-deman
Copy link
Author

hd-deman commented Nov 7, 2018 via email

@ghost
Copy link

ghost commented Mar 31, 2020

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Mar 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants