File tree 2 files changed +10
-1
lines changed 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ async function greet(name) {
17
17
async function routeHandler ( event , context ) {
18
18
const { pathRaw, httpMethod } = event ;
19
19
const pathPrefix = process . env . PATH_PREFIX || "/hello" ;
20
- const path = pathRaw . replace ( pathPrefix , "" ) ;
20
+ const path = pathRaw . replace ( pathPrefix , "" ) || "/" ;
21
21
const routeKey = `${ path } _${ httpMethod } ` ;
22
22
23
23
switch ( routeKey ) {
Original file line number Diff line number Diff line change
1
+ data "aws_caller_identity" "current" {}
1
2
data "aws_region" "current" {}
2
3
3
4
resource "github_branch_protection" "this" {
@@ -47,3 +48,11 @@ resource "github_actions_environment_variable" "this" {
47
48
variable_name = " AWS_REGION"
48
49
value = data. aws_region . current . name
49
50
}
51
+
52
+ resource "github_actions_environment_secret" "aws_account_id" {
53
+ repository = " aws-lambda-opentofu-github-actions"
54
+
55
+ environment = github_repository_environment. this . environment
56
+ secret_name = " AWS_ACCOUNT_ID"
57
+ plaintext_value = data. aws_caller_identity . current . account_id
58
+ }
You can’t perform that action at this time.
0 commit comments