This Terraform module deploys a Service Bot on AWS EKS using Helm. The Service Bot automates DevOps workflows and provides team collaboration features through integrations with Slack, GitHub, Jenkins, and Atlassian products (Jira/Confluence).
- Automated Deployment: Deploys the Service Bot application using the
spartanHelm chart with AWS ALB Ingress. - Kubernetes Management: Configures ServiceAccount with RBAC permissions, namespaces, ConfigMaps, and Secrets.
- Multi-Platform Integration: Connects to Slack for notifications, GitHub App for repository management, Jenkins for CI/CD, and Atlassian for documentation.
- Secure Configuration: Uses Kubernetes secrets for sensitive data and supports IAM roles for service accounts (IRSA).
- Customizable Resources: Allows configuration of pod resources, replica counts, and health check endpoints.
module "service_bot" {
source = "c0x12c/helm-service-bot/aws"
version = "0.4.0"
cluster_name = "my-eks-cluster"
eks_oidc_provider = {
arn = "arn:aws:iam::123456789012:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/EXAMPLED539D4633E53DE1B71EXAMPLE"
url = "https://oidc.eks.us-east-1.amazonaws.com/id/EXAMPLED539D4633E53DE1B71EXAMPLE"
}
region = "us-east-1"
route53_zone_id = "Z0123456789ABCDEF"
alb_dns = "my-alb-dns-name.us-east-1.elb.amazonaws.com"
environment = "dev"
# Slack Configuration
slack_signing_secret = var.slack_signing_secret
slack_bot_token = var.slack_bot_token
slack_user_token = var.slack_user_token
slack_bot_user_id = "U12345678"
allowed_slack_channel = "C12345678"
slack_channel_prefix = "prj-spartan-"
# GitHub Configuration (GitHub App)
github_org = "my-org"
app_repo_list = ["repo-1", "repo-2"]
github_app_id = "123456"
github_app_installation_id = "87654321"
github_app_private_key = var.github_app_private_key
# Jenkins Configuration (optional)
jenkins_username = "jenkins-user"
jenkins_api_token = var.jenkins_api_token
# Atlassian Configuration (optional)
atlassian_username = "atlassian-user"
atlassian_api_token = var.atlassian_api_token
}Refer to the complete example for a full implementation including provider configuration.
| Name | Version |
|---|---|
| terraform | >= 1.10 |
| aws | ~> 5 |
| helm | ~> 3.0 |
| kubernetes | ~> 2 |
| Name | Version |
|---|---|
| helm | ~> 3.0 |
| kubernetes | ~> 2 |
| Name | Source | Version |
|---|---|---|
| eks_service | c0x12c/eks-service/aws | 0.2.8 |
| Name | Type |
|---|---|
| helm_release.service_bot | resource |
| kubernetes_cluster_role_binding_v1.service_bot | resource |
| kubernetes_cluster_role_v1.service_bot | resource |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| alb_dns | The DNS name of the ALB | string |
n/a | yes |
| allowed_slack_channel | Allowed Slack channel | string |
n/a | yes |
| app_domain | The application domain | string |
"example.com" |
no |
| app_repo_list | List of application repositories | list(string) |
n/a | yes |
| atlassian_api_token | Atlassian API token | string |
null |
no |
| atlassian_host | Atlassian host URL | string |
"https://example.atlassian.net" |
no |
| atlassian_page_path_prefix | Atlassian page path prefix | string |
"wiki/spaces/C0X12C/pages" |
no |
| atlassian_username | Atlassian username | string |
"spartan" |
no |
| cluster_name | The name of the EKS cluster | string |
n/a | yes |
| eks_oidc_provider | The OIDC provider for the EKS cluster | object({ arn = string, url = string }) |
n/a | yes |
| environment | The micronaut environment | string |
n/a | yes |
| github_app_id | GitHub App ID | string |
n/a | yes |
| github_app_installation_id | GitHub App Installation ID | string |
n/a | yes |
| github_app_private_key | GitHub App private key | string |
n/a | yes |
| github_org | GitHub organization name | string |
n/a | yes |
| http_client_log_level | HTTP client log level | string |
"INFO" |
no |
| infra_repo_list | List of infrastructure repositories | list(string) |
[] |
no |
| jenkins_api_token | Jenkins API token | string |
null |
no |
| jenkins_host | Jenkins host URL | string |
"https://jenkins.example.com" |
no |
| jenkins_repository | Jenkins repository | string |
"jenkins-job-dsl-scripts" |
no |
| jenkins_username | Jenkins username | string |
"spartan" |
no |
| namespace | The namespace to deploy the service | string |
"service-bot" |
no |
| on_call_page_id | On-call page ID | string |
"48660500" |
no |
| on_call_process_page_id | On-call process page ID | string |
"41812488" |
no |
| on_call_slack_channel | On-call Slack channel | string |
"on-call" |
no |
| on_call_template_page_id | On-call template page ID | string |
"30736481" |
no |
| region | AWS region | string |
n/a | yes |
| route53_zone_id | Route53 hosted zone ID | string |
n/a | yes |
| service_bot_image_repository | Docker image for the service bot | string |
"ghcr.io/spartan-stratos/service-bot" |
no |
| service_bot_image_tag | Docker image tag for the service bot | string |
"v0.2.0" |
no |
| service_name | The name of the service | string |
"service-bot" |
no |
| service_resources | Kubernetes resource requests and limits for the service bot | map(map(string)) |
{ |
no |
| slack_bot_token | Slack bot token | string |
n/a | yes |
| slack_bot_user_id | Slack bot user ID | string |
n/a | yes |
| slack_channel_prefix | Slack channel prefix | string |
n/a | yes |
| slack_signing_secret | Slack signing secret | string |
n/a | yes |
| slack_user_group_names | Slack user group names | string |
"dev-system" |
no |
| slack_user_token | Slack user token | string |
n/a | yes |
| space_id | Confluence Space ID | string |
"12779524" |
no |
| spartan_chart_version | Version of the Spartan Helm chart to deploy | string |
"0.1.18" |
no |
No outputs.