-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(wirepas): re-add gateway resources
- Loading branch information
1 parent
0d82819
commit 7705ea2
Showing
33 changed files
with
16,100 additions
and
16,703 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx lint-staged | ||
npx tsc | ||
npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# ADR 004: Static protobuf parsers and generators | ||
|
||
We generate static parsers and generators for protobuf files using | ||
[`protobuf-ts`](https://github.com/timostamm/protobuf-ts/) to reduce the amount | ||
of code needed to be bundled for lambda functions. | ||
|
||
Initially [`protobufjs`](https://protobufjs.github.io/protobuf.js/)' | ||
[pbsj](https://protobufjs.github.io/protobuf.js/#pbjs-for-javascript) was tried | ||
but it did not generate working static files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import type { Stack } from 'aws-cdk-lib' | ||
import { aws_iam as IAM } from 'aws-cdk-lib' | ||
import { Construct } from 'constructs' | ||
import type { WebsocketAPI } from './WebsocketAPI' | ||
|
||
export class Wirepas5GMeshGateway extends Construct { | ||
public readonly accessKey | ||
constructor(parent: Stack, { websocketAPI }: { websocketAPI: WebsocketAPI }) { | ||
super(parent, 'Wirepas5GMeshGateway') | ||
|
||
const gatewayUser = new IAM.User(this, 'gatewayUser') | ||
gatewayUser.addToPolicy( | ||
new IAM.PolicyStatement({ | ||
actions: ['iot:DescribeEndpoint'], | ||
resources: [`*`], | ||
}), | ||
) | ||
gatewayUser.addToPolicy( | ||
new IAM.PolicyStatement({ | ||
actions: ['execute-api:ManageConnections'], | ||
resources: [websocketAPI.websocketAPIArn], | ||
}), | ||
) | ||
websocketAPI.connectionsTable.grantFullAccess(gatewayUser) | ||
|
||
this.accessKey = new IAM.CfnAccessKey(this, 'accessKey', { | ||
userName: gatewayUser.userName, | ||
status: 'Active', | ||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.