Terraform-provider-aws: Elastic Beanstalk & RDS silent failure to apply v2

Created on 17 Aug 2019  路  3Comments  路  Source: hashicorp/terraform-provider-aws

There was a ticket, #3955 but it was closed without any fix. The issue is still present.

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version


Terraform v0.12.6

  • provider.aws v2.24.0

Affected Resource(s)

  • aws_elastic_beanstalk_environment

Terraform Configuration Files

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

resource "aws_elastic_beanstalk_application" "tftest" {
  name = "tf-eb-rds-test-1"
  description = "App to test EB env with rds cration "
}

resource "aws_elastic_beanstalk_environment" "tfenvtest" {
  name = "tf-test-name-1"
  application = "${aws_elastic_beanstalk_application.tftest.name}"
  solution_stack_name = "64bit Amazon Linux 2018.03 v3.2.1 running Tomcat 8.5 Java 8"

  setting {
    namespace = "aws:rds:dbinstance"
    name = "DBEngine"
    value = "postgres"
  }
  setting {
    namespace = "aws:rds:dbinstance"
    name = "DBEngineVersion"
    value = "10"
  }
  setting {
    namespace = "aws:rds:dbinstance"
    name = "DBUser"
    value = "postgresss"
  }
  setting {
    namespace = "aws:rds:dbinstance"
    name = "DBPassword"
    value = "123456"
  }
  setting {
    namespace = "aws:rds:dbinstance"
    name = "DBDeletionPolicy"
    value = "Snapshot"
  }
  setting {
    namespace = "aws:rds:dbinstance"
    name = "DBAllocatedStorage"
    value = "10"
  }
  setting {
    namespace = "aws:rds:dbinstance"
    name = "DBInstanceClass"
    value = "t3.small"
  }
}

Debug Output


https://gist.github.com/jkolobok/d20749ee48bfa31038b410394f255fe4

Panic Output

Expected Behavior


Elastic beanstalk environment with RDS instance attached to it will be created

Actual Behavior

TF creates EB environment without RDS at all

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #3955
needs-triage servicelasticbeanstalk

Most helpful comment

Same thing happens with:
$ terraform -version
Terraform v0.12.28

  • provider.aws v2.68.0
  • provider.azurerm v2.16.0

All 3 comments

Please vote on this issue by adding a +1 reaction to the original issue to help the community and maintainers prioritize this request

I can't add a reaction to the original issue. I suspect that is because it is closed, so I doubt anyone can. I added a +1 to this instead. Let me know if there is a better way for me or others to vote for this.

Same thing happens with:
$ terraform -version
Terraform v0.12.28

  • provider.aws v2.68.0
  • provider.azurerm v2.16.0

As soon as I got it is not enough to set RDS related options.
AWS WebConsole uses TemplateSpecification field. The field contains CloudFormation snippet which creates RDS.
Example of the snippet: https://s3.eu-west-1.amazonaws.com/elasticbeanstalk-env-resources-eu-west-1/eb_snippets/rds/rds.json

And if you take a look at eb cli code you also find TemplateSpecification:
https://github.com/aws/aws-elastic-beanstalk-cli/blob/4b68bc370aedce6e09297ad50b59a3cf16d5eda3/ebcli/lib/elasticbeanstalk.py#L278-L286

I think the same logic should be implemented in provider.

Was this page helpful?
0 / 5 - 0 ratings