hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.87k stars 9.21k forks source link

[Bug]: Plan output showing changes where none is present #29454

Open richardhopton opened 1 year ago

richardhopton commented 1 year ago

Terraform Core Version

1.3.9

AWS Provider Version

4.54.0

Affected Resource(s)

When performing a terraform plan where a single setting value is changed on an elastic beanstalk environment the output shows every setting changed like so:-

      - setting {
          - name      = "StreamLogs" -> null
          - namespace = "aws:elasticbeanstalk:cloudwatch:logs" -> null
          - value     = "true" -> null
        }
      + setting {
          + name      = "StreamLogs"
          + namespace = "aws:elasticbeanstalk:cloudwatch:logs"
          + value     = "true"
        }
      - setting {
          - name      = "UpdateLevel" -> null
          - namespace = "aws:elasticbeanstalk:managedactions:platformupdate" -> null
          - value     = "minor" -> null
        }
      + setting {
          + name      = "UpdateLevel"
          + namespace = "aws:elasticbeanstalk:managedactions:platformupdate"
          + value     = "minor"
        }

This makes it impossible to see the actual changes being applied, which might be changing a critical setting, and makes Terraform apply options hard to trust.

Expected Behavior

Where a settings value hasn't changed don't show any change

Actual Behavior

Unchanged settings filling the console. e.g.

      - setting {
          - name      = "PreferredStartTime" -> null
          - namespace = "aws:elasticbeanstalk:managedactions" -> null
          - value     = "MON:08:00" -> null
        }
      + setting {
          + name      = "PreferredStartTime"
          + namespace = "aws:elasticbeanstalk:managedactions"
          + value     = "MON:08:00"
        }

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

terraform {
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 4.0"
    }
  }
}

provider "aws" {
  region  = "us-east-1"
}

resource "aws_elastic_beanstalk_environment" "test" {
  name                = "test"
  application         = "wit-external-api"
  solution_stack_name = "64bit Amazon Linux 2 v3.5.4 running Docker"

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

  setting {
    namespace = "aws:elasticbeanstalk:cloudwatch:logs"
    name      = "DeleteOnTerminate"
    value     = "true"
  }

  setting {
    namespace = "aws:elasticbeanstalk:cloudwatch:logs"
    name      = "StreamLogs"
    value     = "false"
  }

  setting {
    namespace = "aws:elasticbeanstalk:cloudwatch:logs:health"
    name      = "DeleteOnTerminate"
    value     = "true"
  }
}

Steps to Reproduce

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue