File tree 3 files changed +9
-4
lines changed
3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 23
23
SSH_KEY : " ./id_rsa_terraform"
24
24
TF_VAR_private_key : " ./id_rsa_terraform"
25
25
TF_VAR_public_key : " ./id_rsa_terraform.pub"
26
- TF_VAR_user_name : " apm-aws-lambda-${{ github.run_id }}"
27
-
26
+ TF_VAR_github_workflow_id : " apm-aws-lambda-${{ github.run_id }}-${{ github.run_number }}"
28
27
TF_VAR_BUILD_ID : " ${{ github.run_id }}"
29
28
TF_VAR_ENVIRONMENT : ' ci'
30
29
TF_VAR_BRANCH : " ${{ github.ref_name }}"
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ resource "aws_lambda_function" "test_lambda" {
103
103
}
104
104
105
105
resource "aws_cloudwatch_log_group" "example" {
106
- name = " /aws/lambda/${ local . user_name } -smoke-testing-test"
106
+ name = " /aws/lambda/${ local . user_name } -smoke-testing-test- ${ var . github_workflow_id } "
107
107
retention_in_days = 1
108
108
}
109
109
@@ -122,7 +122,7 @@ data "aws_iam_policy_document" "lambda_logging" {
122
122
}
123
123
124
124
resource "aws_iam_policy" "lambda_logging" {
125
- name = " smoketest_extension_lambda_logging "
125
+ name = " ${ local . user_name } -smoke-testing-test- ${ var . github_workflow_id } "
126
126
path = " /"
127
127
description = " IAM policy for logging during smoketest for apm aws lambda extension"
128
128
policy = data. aws_iam_policy_document . lambda_logging . json
Original file line number Diff line number Diff line change @@ -33,3 +33,9 @@ variable "ess_version" {
33
33
description = " ess version"
34
34
default = " 8.[0-9]?([0-9]).[0-9]?([0-9])$"
35
35
}
36
+
37
+ variable "github_workflow_id" {
38
+ type = string
39
+ description = " The GitHub Workflow ID"
40
+ default = " 1"
41
+ }
You can’t perform that action at this time.
0 commit comments