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]: Athena - aws_athena_data_catalog fails for federated type data sources #41050

Open
francisInfact opened this issue Jan 23, 2025 · 1 comment
Labels
bug Addresses a defect in current functionality. service/athena Issues and PRs that pertain to the athena service.

Comments

@francisInfact
Copy link

francisInfact commented Jan 23, 2025

Terraform Core Version

1.9.8

AWS Provider Version

5.84.0

Affected Resource(s)

aws_athena_data_catalog

Expected Behavior

I would expect the terraform provider to successfully create the data source and all dependent resources.

Actual Behavior

Terraform fails immediately and does not wait for the resource(s) to be created. This is probably due to the fact that Athena creates these resources asynchronously and therefore the resource doesn't exist for a period (until dependent resources have finished creation). Downstream it seems like the following resources are created

  • CloudFormation stack with
  • Lambda for JDBC connections (in this case, this may differ for other FEDERATED connections)
  • Glue connections/catalog

Although the failure happens, assuming the configuration is correct the resource does eventually create correctly. However, if terraform is then re-applied the resource is marked as tainted and is deleted.

Relevant Error/Panic Output Snippet

Error: listing tags for Athena Data Catalog (ARN): operation error Athena: ListTagsForResource, https response error StatusCode: 400, RequestID: ... ResourceNotFoundException: Could not find valid resource from ARN:..

Terraform Configuration Files

resource "aws_athena_data_catalog" "example" {
  name        = "my-data-catalog"
  description = "JDBC Conn"
  type        = "FEDERATED"

  parameters = {
    "connection-type" = "POSTGRESQL"
    "connection-properties" = jsonencode({
           "spill_bucket" = "...",
           "host" = "...",
          "port" = "..",
          "database" = "..",
          "SecretArn" = "..",
          "AvailabilityZone": "..",
          "SecurityGroupIdList": [...],
          "SubnetId": "..."
    })
  }
}

Steps to Reproduce

Snippet like the above with appropriate connection details to a given DB.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@francisInfact francisInfact added the bug Addresses a defect in current functionality. label Jan 23, 2025
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 service/athena Issues and PRs that pertain to the athena service. needs-triage Waiting for first response or review from a maintainer. labels Jan 23, 2025
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/athena Issues and PRs that pertain to the athena service.
Projects
None yet
Development

No branches or pull requests

2 participants