Terraform-provider-aws: 2.4.0 -> 2.5.0 migration - log_subscription_filter keeps re-planning "distribution" attribute change

Created on 6 Apr 2019  ·  5Comments  ·  Source: hashicorp/terraform-provider-aws

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

TF: 0.11.11
AWS provider: 2.5.0 (current infrastructure was stable on version 2.4.0)

Affected Resource(s)

  • aws_cloudwatch_log_subscription_filter

Terraform Configuration Files

resource "aws_cloudwatch_log_subscription_filter"
"api-svc-ec2-prd-cloudwatch-subscription"
{
  depends_on = [
    "aws_lambda_permission.api-svc-ec2-prd-sumologic-logging-allow-cloudwatch-lambda"
  ]
  name = "api-svc-ec2-prd-cloudwatch-subscription"
  filter_pattern = ""
  log_group_name =
    "${aws_cloudwatch_log_group.api-svc-ec2-prd-loggroup.name}"
  destination_arn =
    "${aws_lambda_function.cloudwatch-sumologic-logging-lambda.arn}"
}

Steps to Reproduce

  1. terraform plan

Plan output shows that TF is going to set: distribution: "ByLogStream" => ""

  1. terraform apply

Apply output shows that TF is setting: distribution: "ByLogStream" => ""

  1. terraform apply

Plan output shows that TF is going to set: distribution: "ByLogStream" => ""

Workaround

Update the resource and add attribute distribution = "ByLogStream"

bug serviccloudwatchlogs

Most helpful comment

The fix for this has been merged and will release with version 2.25.0 of the Terraform AWS Provider, in about a week. Thanks to @dedamico for the implementation. 👍

All 5 comments

I get this in provider version 2.1.0 too; may be an AWS-side change unrelated to the provider upgrade?

The fix for this has been merged and will release with version 2.25.0 of the Terraform AWS Provider, in about a week. Thanks to @dedamico for the implementation. 👍

This has been released in version 2.25.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

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!

Was this page helpful?
0 / 5 - 0 ratings