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 doesn't support collections like list/set/map #25229

Closed
uchanchlani opened this issue Jun 7, 2022 · 3 comments · Fixed by #25230
Closed

aws_keyspaces_table doesn't support collections like list/set/map #25229

uchanchlani opened this issue Jun 7, 2022 · 3 comments · Fixed by #25230
Labels
bug Addresses a defect in current functionality. service/keyspaces Issues and PRs that pertain to the keyspaces service.
Milestone

Comments

@uchanchlani
Copy link

uchanchlani commented Jun 7, 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

Terraform CLI and Terraform AWS Provider Version

Affected Resource(s)

  • aws_keyspaces_table

Terraform Configuration Files

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

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp
resource "aws_keyspaces_table" "example_table" {
  keyspace_name = "keyspace_name"
  table_name    = "table_name"

  capacity_specification {
    throughput_mode      = "PAY_PER_REQUEST"
  }
  comment {
    message = "I cannot create this table via terraform"
  }
  default_time_to_live = 604800
  encryption_specification {
    type               = "AWS_OWNED_KMS_KEY"
  }
  schema_definition {
    column {
      name = "my_id"
      type = "text"
    }   
    column {
      name = "tags"
      type = "list" # This is incorrect (fails at AWS end)
    }   

    column {
      name = "tags2"
      type = "list<text>" # This fails at provider validations but is indeed correct
    }   

    partition_key {
      name = "my_id"
    }   
  }
}

Debug Output

For the tags column AWS throws this error:

Error: creating Keyspaces Table (keyspace_name/table_name): ValidationException: Unknown type keyspace_name.list

  on tracevault.tf line 81, in resource "aws_keyspaces_table" "example_table":
  81: resource "aws_keyspaces_table" "example_table" {

For the tags2 column the client throws this error:

Error: invalid value for schema_definition.0.column.7.type (The type must consist of lower case alphanumerics.)

  on tracevault.tf line 81, in resource "aws_keyspaces_table" "example_table":
  81: resource "aws_keyspaces_table" "example_table" {

Panic Output

Expected Behavior

The schema definition of tags2 should be accepted

Actual Behavior

As stated above, it fails to validate the regular expression of the type attribute

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@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 Jun 7, 2022
@uchanchlani
Copy link
Author

@ewbankkit : Added a fix for the issue. Please check it

@justinretzolk justinretzolk added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Jun 8, 2022
@github-actions github-actions bot added this to the v4.20.0 milestone Jun 22, 2022
@github-actions
Copy link

This functionality has been released in v4.20.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 Jul 24, 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.

2 participants