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_keyspaces_table specify clustering column order #26276

Closed
jack-at-circle opened this issue Aug 12, 2022 · 2 comments · Fixed by #26812
Closed

aws_keyspaces_table specify clustering column order #26276

jack-at-circle opened this issue Aug 12, 2022 · 2 comments · Fixed by #26812
Labels
bug Addresses a defect in current functionality. service/keyspaces Issues and PRs that pertain to the keyspaces service.

Comments

@jack-at-circle
Copy link

jack-at-circle commented Aug 12, 2022

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

Description

Using the aws_keyspaces_table resource, I can't specify the order of clustering columns. This breaks my current table schema when migrating from Cassandra to Keyspaces. I've tried changing the order of declaration within the schema_definition to no effect.

New or Affected Resource(s)

  • aws_keyspaces_table

Potential Terraform Configuration

Either, respect the order of declaration as an implicit order for the clustering columns, or allow explicit oder declaration like the following

resource "aws_keyspaces_table" "table" {
  keyspace_name = aws_keyspaces_keyspace.example.name
  table_name    = "my_table"

  schema_definition {
    column {
      name = "partition_key"
      type = "ASCII"
    }

    column {
      name = "cluster_key_0"
      type = "ASCII"
    }

    column {
      name = "cluster_key_1"
      type = "ASCII"
    }

    partition_key {
      name = "partition_key"
    }

    clustering_key {
      name = "cluster_key_0"
      order_by = "DESC"
      position = 0
    }

    clustering_key {
      name = "cluster_key_1"
      order_by = "ASC"
      position = 1
    }
  }

  depends_on = [aws_keyspaces_keyspace.keyspace]
}

References

This line may be the problem

@jack-at-circle jack-at-circle added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 12, 2022
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/keyspaces Issues and PRs that pertain to the keyspaces service. labels Aug 12, 2022
@jack-at-circle
Copy link
Author

Comment: I found a crude work around for now by changing column names until they happened to be created in the order I needed

@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Aug 18, 2022
@ewbankkit ewbankkit added bug Addresses a defect in current functionality. and removed enhancement Requests to existing resources that expand the functionality or scope. labels Sep 28, 2022
@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 Oct 31, 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/keyspaces Issues and PRs that pertain to the keyspaces service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants