File tree Expand file tree Collapse file tree 5 files changed +32
-30
lines changed Expand file tree Collapse file tree 5 files changed +32
-30
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,13 @@ module "runners" {
20
20
Project = " ProjectX"
21
21
}
22
22
23
- github_app_client_id = var. github_app_client_id
24
- github_app_client_secret = var. github_app_client_secret
25
- github_app_id = var. github_app_id
26
- github_app_key_base64 = var. github_app_key_base64
27
- github_app_webhook_secret = random_password. random . result
23
+ github_app = {
24
+ key_base64 = var.github_app_key_base64
25
+ id = var.github_app_id
26
+ client_id = var.github_app_client_id
27
+ client_secret = var.github_app_client_secret
28
+ webhook_secret = random_password.random.result
29
+ }
28
30
29
31
enable_organization_runners = false
30
32
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ module "webhook" {
30
30
tags = local. tags
31
31
32
32
sqs_build_queue = aws_sqs_queue. queued_builds
33
- github_app_webhook_secret = var. github_app_webhook_secret
33
+ github_app_webhook_secret = var. github_app . webhook_secret
34
34
}
35
35
36
36
module "runners" {
@@ -47,10 +47,7 @@ module "runners" {
47
47
48
48
sqs = aws_sqs_queue. queued_builds
49
49
50
- github_app_client_id = var. github_app_client_id
51
- github_app_client_secret = var. github_app_client_secret
52
- github_app_id = var. github_app_id
53
- github_app_key_base64 = var. github_app_key_base64
50
+ github_app = var. github_app
54
51
55
52
enable_organization_runners = var. enable_organization_runners
56
53
}
Original file line number Diff line number Diff line change @@ -10,10 +10,10 @@ resource "aws_lambda_function" "scale_runners_lambda" {
10
10
environment {
11
11
variables = {
12
12
ENABLE_ORGANIZATION_RUNNERS = var.enable_organization_runners
13
- GITHUB_APP_KEY_BASE64 = var.github_app_key_base64
14
- GITHUB_APP_ID = var.github_app_id
15
- GITHUB_APP_CLIENT_ID = var.github_app_client_id
16
- GITHUB_APP_CLIENT_SECRET = var.github_app_client_secret
13
+ GITHUB_APP_KEY_BASE64 = var.github_app.key_base64
14
+ GITHUB_APP_ID = var.github_app.id
15
+ GITHUB_APP_CLIENT_ID = var.github_app.client_id
16
+ GITHUB_APP_CLIENT_SECRET = var.github_app.client_secret
17
17
SUBNET_IDS = join (" ," , var. subnet_ids )
18
18
LAUNCH_TEMPLATE_NAME = aws_launch_template.runner.name
19
19
LAUNCH_TEMPLATE_VERSION = aws_launch_template.runner.latest_version
Original file line number Diff line number Diff line change @@ -98,10 +98,13 @@ variable "enable_organization_runners" {
98
98
type = bool
99
99
}
100
100
101
- variable "github_app_key_base64" {}
102
-
103
- variable "github_app_id" {}
104
-
105
- variable "github_app_client_id" {}
101
+ variable "github_app" {
102
+ description = " GitHub app parameters, see your github aapp. Ensure the key is base64 encoded."
103
+ type = object ({
104
+ key_base64 = string
105
+ id = string
106
+ client_id = string
107
+ client_secret = string
108
+ })
109
+ }
106
110
107
- variable "github_app_client_secret" {}
Original file line number Diff line number Diff line change @@ -25,19 +25,19 @@ variable "environment" {
25
25
type = string
26
26
}
27
27
28
- variable "github_app_webhook_secret" {
29
- description = " Secret for the GitHub App webhook"
30
- type = string
31
- }
32
-
33
28
variable "enable_organization_runners" {
34
29
type = bool
35
30
}
36
31
37
- variable "github_app_key_base64" {}
38
-
39
- variable "github_app_id" {}
32
+ variable "github_app" {
33
+ description = " GitHub app parameters, see your github aapp. Ensure the key is base64 encoded."
34
+ type = object ({
35
+ key_base64 = string
36
+ id = string
37
+ client_id = string
38
+ client_secret = string
39
+ webhook_secret = string
40
+ })
41
+ }
40
42
41
- variable "github_app_client_id" {}
42
43
43
- variable "github_app_client_secret" {}
You can’t perform that action at this time.
0 commit comments