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

[Bug]: Terraform cannot handle aws_lakeformation_lf_tag with colon in Tag Key name #26920

Closed
JonathanLieberman opened this issue Sep 21, 2022 · 3 comments · Fixed by #28258
Closed
Labels
bug Addresses a defect in current functionality. service/lakeformation Issues and PRs that pertain to the lakeformation service.
Milestone

Comments

@JonathanLieberman
Copy link

JonathanLieberman commented Sep 21, 2022

Terraform Core Version

1.0.3

AWS Provider Version

4.31.0

Affected Resource(s)

  • aws_lakeformation_lf_tag

Expected Behavior

When creating a Lake Formation Tag with a colon in the name, the resource should create successfully, and terraform apply should succeed for the aws_lakeformation_tag resources.

Actual Behavior

terraform apply fails, the tags are created, the tags are added to the terraform state file, and future terraform plan runs fail due to terraform expecting a different input from the state file (colons interfering with the catalog:tagkey structure)

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

resource "aws_lakeformation_lf_tag" "tag_with_colon" {
    key    = "LoB:Sales"
    values = ["Orders", "Inventory", "Customers"]
}

Steps to Reproduce

  • create configuration with an aws_lakeformation_tag resource with a colon in the tag Key name
  • terraform plan
  • terraform apply

After apply failure, future terraform plan runs will fail

Debug Output

terraform plan output
image

terraform apply output
image

Terraform State File (after failed apply)

{
  "version": 4,
  "terraform_version": "1.0.3",
  "serial": 1,
  "lineage": "47ac89eb-e791-9e78-781f-8eaf657506ad",
  "outputs": {},
  "resources": [
    {
      "mode": "managed",
      "type": "aws_lakeformation_lf_tag",
      "name": "tag_with_colon",
      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
      "instances": [
        {
          "status": "tainted",
          "schema_version": 0,
          "attributes": {
            "catalog_id": null,
            "id": "145103944781:LoB:Sales",
            "key": "LoB:Sales",
            "values": [
              "Customers",
              "Inventory",
              "Orders"
            ]
          },
          "sensitive_attributes": [],
          "private": "bnVsbA=="
        }
      ]
    }
  ]
}

Future terraform plan outputs
image

Proof of Tag Creation (AWS Console)
image

Panic Output

No response

Important Factoids

No response

References

Naming convention follows AWS guidance on creating a centralized Glue Data Catalog (in support of Data Mesh architecture): https://aws.amazon.com/blogs/big-data/build-a-modern-data-architecture-and-data-mesh-pattern-at-scale-using-aws-lake-formation-tag-based-access-control/

Would you like to implement a fix?

No response

@JonathanLieberman JonathanLieberman added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Sep 21, 2022
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/lakeformation Issues and PRs that pertain to the lakeformation service. label Sep 21, 2022
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Oct 27, 2022
andyfurnival added a commit to andyfurnival/terraform-provider-aws that referenced this issue Dec 8, 2022
@github-actions github-actions bot added this to the v4.61.0 milestone Mar 28, 2023
@github-actions
Copy link

This functionality has been released in v4.61.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. Thank you!

@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 Apr 30, 2023
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/lakeformation Issues and PRs that pertain to the lakeformation service.
Projects
None yet
2 participants