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

aws_elasticsearch_domain resource is created without tags #20498

Closed
chaddewitt opened this issue Aug 9, 2021 · 4 comments · Fixed by #21738
Closed

aws_elasticsearch_domain resource is created without tags #20498

chaddewitt opened this issue Aug 9, 2021 · 4 comments · Fixed by #21738
Assignees
Labels
bug Addresses a defect in current functionality. service/elasticsearch Issues and PRs that pertain to the elasticsearch service.

Comments

@chaddewitt
Copy link

chaddewitt commented Aug 9, 2021

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 v1.0.2
on windows_amd64
+ provider registry.terraform.io/hashicorp/aws v3.53.0
+ provider registry.terraform.io/hashicorp/random v3.1.0

Affected Resource(s)

  • aws_elasticsearch_domain

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

terraform {
  required_providers {
    aws = {
      source = "hashicorp/aws"
      version = ">= 3.53.0"
    }
    random = {
      source = "hashicorp/random"
      version = ">= 3.1.0"
    }
  }
  backend "s3" {}
}

provider "aws" {
  region = "us-east-1"
  //noinspection HCLUnknownBlockType
  default_tags {
    tags = {
      Billing = "example company"
      Domain  = "example-8-9-2021"
      User    = "example"
    }
  }
}



resource "aws_elasticsearch_domain" "single" {
  count                 = 1
  domain_name           = "example-8-9-2021"
  elasticsearch_version = "7.4"
  cluster_config {
    instance_count           = 1
    instance_type            = "m5.large.elasticsearch"
    dedicated_master_enabled = false
  }
  ebs_options {
    ebs_enabled = true
    volume_type = "gp2"
    volume_size = 40
  }
  snapshot_options {
    automated_snapshot_start_hour = 0
  }
  tags = {
    Billing = "example company"
    Domain  = "example-8-9-2021"
    User    = "example"
    Name    = "example-8-9-2021 Elasticsearch"
  }
}

Debug Output

https://gist.github.com/chaddewitt/e163a6d7bbe16c0743a7916e4b9a5b24

Panic Output

N/A

Expected Behavior

Tags were created for the Elasticsearch domain as defined in the main.tf file

Actual Behavior

The newly created Elasticsearch domain resource had no tags.

Steps to Reproduce

  1. terraform apply -auto-approve

Important Factoids

N/A

References

N/A

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/elasticsearch Issues and PRs that pertain to the elasticsearch service. labels Aug 9, 2021
@gdavison gdavison self-assigned this Aug 12, 2021
@gdavison
Copy link
Contributor

Hi @chaddewitt, thanks for reporting this. At first glance, there may be a problem because the three tags in default_tags are repeated in the resource, though that would be a bug on our part.

The Gist you included doesn't seem to exist any more, or I don't have access to it.

@chaddewitt
Copy link
Author

Hi @gdavison, thank you for the follow up. Here is a Gist that does exist

https://gist.github.com/chaddewitt/e163a6d7bbe16c0743a7916e4b9a5b24

I've also edited initial link to be correct.

@breathingdust breathingdust added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 27, 2021
@kevinhwang
Copy link

kevinhwang commented Oct 27, 2021

We're seeing the same issue, but don't use the default_tags in our AWS provider configuration.

On first-time creation, a plan will show tags included with the to-be-added ES domain, but on apply, the domain will be created w/o any tags. It takes a second apply (which will cause an update) to cause tags to be applied.

@github-actions
Copy link

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 May 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/elasticsearch Issues and PRs that pertain to the elasticsearch service.
Projects
None yet
4 participants