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

Changing multiple aws_elastic_beanstalk_configuration_template settings at the same time will result in an incorrectly generated template #16402

Closed
grahamleslie opened this issue Oct 19, 2017 · 2 comments

Comments

@grahamleslie
Copy link

If you change multiple Elastic Beanstalk Configuration Template settings with different names in the same apply, Terraform will incorrectly update the template.

Terraform Version

0.10.7

Terraform Configuration Files

Step 1

resource "aws_elastic_beanstalk_configuration_template" "eb_test_configuration_template" {
    name = "eb-test-configuration-template"
    application = "${aws_elastic_beanstalk_application.eb_test.name}"
    solution_stack_name = "${var.solution_stack}"
    setting {
        namespace = "aws:elasticbeanstalk:application:environment"
        name = "TEST"
        value = "0"
    }

Step 2

resource "aws_elastic_beanstalk_configuration_template" "eb_test_configuration_template" {
    name = "eb-test-configuration-template"
    application = "${aws_elastic_beanstalk_application.eb_test.name}"
    solution_stack_name = "${var.solution_stack}"
    setting {
        namespace = "aws:elasticbeanstalk:application:environment"
        name = "TEST"
        value = "2"
    }
    setting {
        namespace = "aws:elasticbeanstalk:application:environment"
        name = "TEST2"
        value = "1"
    }

Debug Output

Terminal Output

 terraform apply
aws_elastic_beanstalk_application.eb_test: Refreshing state... (ID: eb-test)
aws_elastic_beanstalk_configuration_template.eb_test_configuration_template: Refreshing state... (ID: eb-test-
configuration-template)
aws_elastic_beanstalk_configuration_template.eb_test_configuration_template: Modifying... (ID: eb-test-configu
ration-template)
  setting.#:                    "1" => "2"
  setting.2414245282.name:      "TEST" => ""
  setting.2414245282.namespace: "aws:elasticbeanstalk:application:environment" => ""
  setting.2414245282.resource:  "" => ""
  setting.2414245282.value:     "0" => ""
  setting.4175512884.name:      "" => "TEST"
  setting.4175512884.namespace: "" => "aws:elasticbeanstalk:application:environment"
  setting.4175512884.resource:  "" => ""
  setting.4175512884.value:     "" => "1"
  setting.91878006.name:        "" => "TEST2"
  setting.91878006.namespace:   "" => "aws:elasticbeanstalk:application:environment"
  setting.91878006.resource:    "" => ""
  setting.91878006.value:       "" => "1"
aws_elastic_beanstalk_configuration_template.eb_test_configuration_template: Modifications complete (ID: eb-te
st-configuration-template)

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Generated Template

EnvironmentConfigurationMetadata:
  DateCreated: '1508448368000'
  DateModified: '1508448684000'
Platform:
  PlatformArn: arn:aws:elasticbeanstalk:us-east-1::platform/Docker running on 64bit Amazon Linux/2.7.3
OptionSettings:
  aws:elasticbeanstalk:application:environment:
    TEST2: '1'
EnvironmentTier:
  Type: Standard
  Name: WebServer
AWSConfigurationTemplateVersion: 1.1.0.0

Expected Behavior

  • Apply Step 1
  • A template should be generated with TEST: 0
  • Apply Step 2
  • The template should be updated to have both TEST: 2 and TEST2: 1

Actual Behavior

  • Apply Step 1
  • A template should be generated with TEST: 0
  • Apply Step 2
  • The template is updated to have only TEST2: 1 and does not reflect the Terraform resource

Steps to Reproduce

  • Apply Step 1
  • Apply Step 2
  • Inspect the generated template in S3

References

Possibly related:

@hashibot
Copy link
Contributor

This issue has been automatically migrated to hashicorp/terraform-provider-aws#1971 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to this issue and let us know.

@ghost
Copy link

ghost commented Apr 6, 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 Apr 6, 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

3 participants