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

plan for aws_elasticsearch_domain shows differences in 3.10.0 version after 2.70.0 #14628

Closed
m3nthal opened this issue Aug 13, 2020 · 3 comments
Labels
service/cloudwatch Issues and PRs that pertain to the cloudwatch service. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.

Comments

@m3nthal
Copy link

m3nthal commented Aug 13, 2020

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 other comments that do not add relevant new information or questions, 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 CLI and Terraform AWS Provider Version

Terraform v0.12.29

  • provider.aws v3.1.0
  • provider.kubernetes v1.12.0
  • provider.template v2.1.2

Affected Resource(s)

  • aws_elasticsearch_domain

Terraform Configuration Files

resource "aws_cloudwatch_log_group" "application_logs" {
  count             = var.elastic_enabled == true ? 1 : 0
  name              = "/aws/eks/debug/application-logs"
  # irrelevant parts omitted
}

resource "aws_elasticsearch_domain" "elasticsearch" {
  count                 = var.elastic_enabled == true ? 1 : 0

# irrelevant parts omitted

  log_publishing_options {
    cloudwatch_log_group_arn = aws_cloudwatch_log_group.application_logs.0.arn
    log_type                 = "ES_APPLICATION_LOGS"
    enabled                  = true
  }
}

Debug Output

Relevant part of Terraform plan:

      + log_publishing_options {
          + cloudwatch_log_group_arn = "arn:aws:logs:****************************:log-group:/aws/eks/debug/application-logs"
          + enabled                  = true
          + log_type                 = "ES_APPLICATION_LOGS"
        }
      - log_publishing_options {
          - cloudwatch_log_group_arn = "arn:aws:logs:****************************:log-group:/aws/eks/debug/application-logs:*" -> null
          - enabled                  = true -> null
          - log_type                 = "ES_APPLICATION_LOGS" -> null
        }

Terraform state shows correct arn of the log group (with :* at the end):

resource "aws_cloudwatch_log_group" "search_logs" {
    arn               = "arn:aws:logs:****************************:log-group:/aws/eks/debug/search-logs:*"
   # irrelevant parts omitted
}

Expected Behavior

Terraform plan should not show any differences. As in 2.70.0 version of aws provider.

Actual Behavior

3.10.0 version of aws provider shows differences in arn (note the :* on the end) of the log group, however nothings was changed apart from aws provider version.

Steps to Reproduce

  1. terraform apply with aws-provider 2.70.0
  2. terraform plan with aws-provider 3.10.0
@ghost ghost added service/cloudwatchlogs service/cloudwatch Issues and PRs that pertain to the cloudwatch service. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. labels Aug 13, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 13, 2020
@anGie44 anGie44 removed the needs-triage Waiting for first response or review from a maintainer. label Sep 21, 2020
@anGie44
Copy link
Contributor

anGie44 commented Sep 21, 2020

Hi @m3nthal thank you for creating this issue! since the major version release of 3.0.0 of the provider, the aws_cloudwatch_log_group resource's arn attribute no longer is returned with the :* suffix, explaining the diff you're seeing. A workaround to suppress this diff is to use the string interpolation "${aws_cloudwatch_log_group}.arn}:*" in the cloudwatch_log_group_arn reference. Further upgrade examples are also available here.

Hope this helps and if you have additional questions, please let me know 😃

Copy link

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

@github-actions github-actions bot added the stale Old or inactive issues managed by automation, if no further action taken these will get closed. label Apr 28, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
Copy link

github-actions bot commented Jul 4, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/cloudwatch Issues and PRs that pertain to the cloudwatch service. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. stale Old or inactive issues managed by automation, if no further action taken these will get closed.
Projects
None yet
Development

No branches or pull requests

3 participants