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_glue_crawler: name reported as invalid against regex when AWS accepts the name #19159

Closed
SeanKilleen opened this issue Apr 29, 2021 · 4 comments · Fixed by #19160
Closed
Labels
bug Addresses a defect in current functionality. service/glue Issues and PRs that pertain to the glue service.
Milestone

Comments

@SeanKilleen
Copy link
Contributor

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

  • Terraform v0.15.0
  • on windows_amd64
  • provider registry.terraform.io/hashicorp/aws v3.35.0

Affected Resource(s)

  • aws_glue_crawler

Terraform Configuration Files

This has to do with the import process and the act of not writing some HCL, so I won't include the HCL here, but am happy to paste what's relevant with a little guidance.

Steps to reproduce

  • Create a crawler manually within AWS with a name that contains / characters, e.g. Crawler-business-solutions-data/s3path/contact/rawdata/
  • Create HCL with the intent of importing the resource and working backward, e.g.
resource "aws_glue_crawler" "raw_data_crawler" {
  database_name = aws_glue_catalog_database.aws_glue_catalog_database.name
  name          = "Crawler-business-solutions-data/s3path/contact/rawdata/"
  role = "TBD"
}

NOTE: the import will complete successfully

  • Run terraform plan with the appropriate variables

Expected Behavior

Expect to see the drift between our defined configuration and the current resource's state so that I can work backward.

Actual Behavior

I see an error:

expected value of name to match regular expression "[a-zA-Z0-9-_$#]+$", got Crawler-business-solutions-data/s3path/contact/rawdata/

Important Factoids

  • I am still new enough to AWS and Terraform that I very much accept this may be an issue of my understanding rather than a bug. If this is a question of my mistaken understanding, I am happy to bring my inquiry to the forum for more general resolution.
  • It appears that AWS has possibly relaxed its rules around names and the terraform provider may need to follow suit.

References

@ghost ghost added the service/glue Issues and PRs that pertain to the glue service. label Apr 29, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 29, 2021
@SeanKilleen SeanKilleen changed the title aws_glue_crawler: name reported as invalid against regex when AWS accepts the resource aws_glue_crawler: name reported as invalid against regex when AWS accepts the name Apr 29, 2021
@DrFaust92
Copy link
Collaborator

I cant find exact AWS docs that prompted to use this regex but its a bug.

@DrFaust92 DrFaust92 added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 29, 2021
@SeanKilleen
Copy link
Contributor Author

Thanks for the confirmation @DrFaust92! I've got #19160 which should fix this particular instance, and I'd be happy to do a more holistic sweep for this regex occurrence and update it where applicable.

@github-actions github-actions bot added this to the v3.38.0 milestone Apr 29, 2021
@ghost
Copy link

ghost commented Apr 30, 2021

This has been released in version 3.38.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 for triage. Thanks!

@github-actions
Copy link

github-actions bot commented Jun 1, 2021

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 Jun 1, 2021
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/glue Issues and PRs that pertain to the glue service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants