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

Fix: Incorrect AWS Lambda Qualifier Regexp #11383

Merged
merged 1 commit into from
Jan 26, 2017

Conversation

brad-larson
Copy link

@brad-larson brad-larson commented Jan 24, 2017

Type of change:

  • Bug fix

What changed? ... and Why:

The regexp is currently set to:
pattern := ^[a-zA-Z0-9$_]+$

The AWS docs state that qualifer names must conform to the following
regexp:
Pattern: (|[a-zA-Z0-9$_-]+)

As you can see, the current regexp in Terraform is missing the - at
the end.

This addresses that.

How has it been tested?

Added a few test cases to the existing spec for AwsLambdaQualifier
validation.

Type of change:
===============
- Bug fix

What changed? ... and Why:
==========================
The regexp is currently set to:
`pattern := `^[a-zA-Z0-9$_]+$`

The AWS docs state that qualifer names must conform to the following
regexp:
`Pattern: (|[a-zA-Z0-9$_-]+)`

As you can see, the current regexp in Terraform is missing the `-` at
the end.

This addresses that.

How has it been tested?
=======================
Added a few test cases to the existing spec for `AwsLambdaQualifier`
validation.
@catsby
Copy link
Contributor

catsby commented Jan 24, 2017

Hey @brad-larson – can you clarify for me what resources this impacts, and the documentation you're referencing? I'm looking at the API docs here:

I'm not seeing the trading - as you mention. Can you show me what I'm missing?

@brad-larson
Copy link
Author

brad-larson commented Jan 24, 2017

@catsby This impacts the AwsLambdaPermission resource, and the docs link is: http://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html

Basically, the qualifier == the alias name, so if an alias name can contain -, then the qualifer should be able to as well.

@catsby
Copy link
Contributor

catsby commented Jan 26, 2017

AH ok, thanks!

@catsby catsby merged commit e3c89da into hashicorp:master Jan 26, 2017
@ghost
Copy link

ghost commented Apr 17, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants