-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmain.tf
30 lines (26 loc) · 851 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 4.57.0"
}
}
}
provider "aws" {
region = "eu-west-1"
}
module "my_workerpool" {
source = "github.com/spacelift-io/terraform-aws-spacelift-workerpool-on-ec2?ref=v2.3.5"
configuration = <<-EOT
export SPACELIFT_TOKEN="${var.worker_pool_config}"
export SPACELIFT_POOL_PRIVATE_KEY="${var.worker_pool_private_key}"
EOT
min_size = 1
max_size = 5
worker_pool_id = var.worker_pool_id
security_groups = var.worker_pool_security_groups
vpc_subnets = var.worker_pool_subnets
spacelift_api_key_endpoint = var.spacelift_api_key_endpoint
spacelift_api_key_id = var.spacelift_api_key_id
spacelift_api_key_secret = var.spacelift_api_key_secret
}