Skip to content

Commit

Permalink
Make terraform validate succeed
Browse files Browse the repository at this point in the history
  • Loading branch information
gertjanmaas committed May 8, 2020
1 parent 46972eb commit 292faa1
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 35 deletions.
20 changes: 10 additions & 10 deletions examples/default/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
output "action_runners" {
output "runners" {
value = {
runners = module.runners.runners
}
}

# output "binaries_syncer" {
# value = {
# binaries_syncer = module.runners.binaries_syncer
# }
# }

output "lambda_binaries_syncer_name" {
value = module.runners.binaries_syncer.lambda.id
}


output "github_app_webhook_secret" {
value = random_password.random.result
output "webhook" {
value = {
gateway = module.runners.webhook.gateway
}
}


9 changes: 9 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ module "runners" {

s3_bucket_runner_binaries = module.runner_binaries.bucket
s3_location_runner_binaries = local.s3_action_runner_url

sqs = aws_sqs_queue.queued_builds

github_app_client_id = var.github_app_client_id
github_app_client_secret = var.github_app_client_secret
github_app_id = var.github_app_id
github_app_key_base64 = var.github_app_key_base64

enable_organization_runners = var.enable_organization_runners
}

module "runner_binaries" {
Expand Down
24 changes: 14 additions & 10 deletions modules/runners/policies/lambda-scale-down.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances*",
"ec2:DescribeTags",
"ec2:CreateTags",
"ec2:TerminateInstances"
],
"Resource": ["*"]
},
}
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances*",
"ec2:DescribeTags",
"ec2:CreateTags",
"ec2:TerminateInstances"
],
"Resource": ["*"]
}
]
}
34 changes: 19 additions & 15 deletions modules/runners/policies/lambda-scale-up.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
{
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeTags",
"ec2:CreateTags",
"ec2:RunInstances",
],
"Resource": ["*"]
},
{
"Effect": "Allow",
"Action": "iam:PassRole",
"Resource": "${arn_runner_instance_role}"
}
}
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:DescribeInstances",
"ec2:DescribeTags",
"ec2:CreateTags",
"ec2:RunInstances"
],
"Resource": ["*"]
},
{
"Effect": "Allow",
"Action": "iam:PassRole",
"Resource": "${arn_runner_instance_role}"
}
]
}
1 change: 1 addition & 0 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ output "binaries_syncer" {

output "webhook" {
value = {
gateway = module.webhook.gateway
lambda = module.webhook.lambda
lambda_role = module.webhook.lambda_role
}
Expand Down

0 comments on commit 292faa1

Please sign in to comment.