Skip to content

Conversation

@zbintliff
Copy link

@zbintliff zbintliff commented Feb 21, 2020

The URI check is just value =~ /^[a-z]+:/ which doesn't even make sure
the value is a valid ARN just that it starts with a letter and has a :.

We use terraform to manage our StepFunctions. Because we operate in a
few different regions we template out the JSON (still valid json!) an
then use terraform templating to create the template and manage teht
SFN. There is no time after terraform interpolates variables for us to
run a file through the linter (its all in memory).

We are just running into this because instead of interpolating region in
the ARN we are now using a data resource to allow terraform to drop the
whole ARN in.

That is we are going from:

"Resource": "arn:aws:lambda:${region}:${account}:function:foobar:${alias}"

To:

"Resource": "${lambda_arn}"

The first passes the very lax regex the second doesn't

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The URI check is just `value =~ /^[a-z]+:/` which doesn't even make sure
the value is a valid ARN just that it starts with a letter and has a
`:`.

We use terraform to manage our StepFunctions. Because we operate in a
few different regions we template out the JSON (still valid json!) an
then use terraform templating to create the template and manage teht
SFN. There is no time after terraform interpolates variables for us to
run a file through the linter (its all in memory).

We are just running into this because instead of interpolating region in
the ARN we are now using a data resource to allow terraform to drop the
whole ARN in.

That is we are going from:
```
"Resource": "arn:aws:lambda:${region}:${account}:function:foobar:${alias}"
```
To:
```
"Resource": "${lambda_arn}"
```

The first passes the very lax regex the second doesn't
@zbintliff zbintliff force-pushed the feature/relax-resource-constraint branch from aa6bbad to b898f80 Compare February 21, 2020 18:03
@almorelle
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants