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

ch: refactor hack to use regex in terraform #1946

Merged
merged 2 commits into from
Dec 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions twilio-iac/terraform-modules/lex/v1/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ resource "aws_lex_slot_type" "this" {
# that doesn’t allow numbers or certain special characters. Unfortunately, this restriction is imposed by AWS,
# and I cannot directly override it. AWS Lex has specific naming requirements for intents, slots, and bot names
# and Terraform enforces these requirements when you create resources.
# So a work-around for the e2e account was to replace the "2" with the letter ""
# So a work-around for the e2e account was to replace the "[0-9]" with the no space ""

name = replace("${local.name_prefix}_${each.key}", "2", "")
name = replace("${local.name_prefix}_${each.key}", "[0-9]", "")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that [0-9] needs to be wrapped in forward slashes to be treated like a regex.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robert-bo-davis - I have added the forward slash

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just go ahead and merge this, @robert-bo-davis isn't around to approve PRs anywhere near as promptly as he used to be :-)

description = each.value.description
value_selection_strategy = each.value.value_selection_strategy

Expand Down
Loading