Skip to content

Commit 6026947

Browse files
committed
Fix arn issue
Should be Arn not ARN.
1 parent c38d64b commit 6026947

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[![Node Version][Node Version Badge]](package.json#L35)
99

1010
Serverless framework plugin that will automatically generate CloudFormation
11-
snippets to reference a functions name or ARN value based on the generated
11+
snippets to reference a functions `name` or `arn` value based on the generated
1212
logical ID used during creation of the CloudFormation templates.
1313

1414
## Installation
@@ -60,7 +60,7 @@ resources:
6060
LambdaFunctionExecutor:
6161
Type: Custom::LambdaFunctionExecutor
6262
Properties:
63-
ServiceToken: !GetAtt HealthLambdaFunction.ARN # resolved
63+
ServiceToken: !GetAtt HealthLambdaFunction.Arn # resolved
6464
Name: !Ref HealthLambdaFunction # resolved
6565
6666
functions:

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "serverless-plugin-function-value",
3-
"version": "1.0.3",
4-
"description": "Serverless framework plugin that will automatically generate CloudFormation snippets to reference a functions name or ARN value based on the generated logical ID used during creation of the CloudFormation templates",
3+
"version": "1.0.4",
4+
"description": "Serverless framework plugin that will automatically generate CloudFormation snippets to reference a functions name or arn value based on the generated logical ID used during creation of the CloudFormation templates",
55
"main": "dist/index.js",
66
"scripts": {
77
"build": "babel --out-dir dist src",

src/function-value-plugin.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export class FunctionValuePlugin {
33
this.naming = serverless.getProvider('aws').naming;
44
this.functions = serverless.service.getAllFunctions();
55
this.variableResolvers = {
6-
'fn.arn': (value) => this.getFunctionARNStatement(value),
6+
'fn.arn': (value) => this.getFunctionArnStatement(value),
77
'fn.name': (value) => this.getFunctionNameStatement(value)
88
};
99
}
@@ -20,8 +20,8 @@ export class FunctionValuePlugin {
2020
return this.naming.getLambdaLogicalId(functionName);
2121
}
2222

23-
getFunctionARNStatement(value) {
24-
return Promise.resolve(`!GetAtt ${this.getFunctionLogicalId(value)}.ARN`);
23+
getFunctionArnStatement(value) {
24+
return Promise.resolve(`!GetAtt ${this.getFunctionLogicalId(value)}.Arn`);
2525
}
2626

2727
getFunctionNameStatement(value) {

test/function-value-plugin.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('plugin', () => {
2020
});
2121

2222
[
23-
{ type: 'arn', expected: `!GetAtt ${logicalId}.ARN` },
23+
{ type: 'arn', expected: `!GetAtt ${logicalId}.Arn` },
2424
{ type: 'name', expected: `!Ref ${logicalId}` }
2525
].forEach(test => {
2626
it(`will generate function ${test.type} snippet`, async () => {

0 commit comments

Comments
 (0)