diff --git a/examples/addition-iam-policies/iam.tf b/examples/addition-iam-policies/iam.tf index 581fc38..2f2cf1b 100644 --- a/examples/addition-iam-policies/iam.tf +++ b/examples/addition-iam-policies/iam.tf @@ -11,6 +11,6 @@ data "aws_iam_policy_document" "secrets_manager" { } resource "aws_iam_policy" "secrets_manager" { - name = "${var.source_name}-secrets-manager-policy" + name = "${var.name}-secrets-manager-policy" policy = data.aws_iam_policy_document.secrets_manager.json } \ No newline at end of file diff --git a/examples/addition-iam-policies/main.tf b/examples/addition-iam-policies/main.tf index cb38081..e4cbcfb 100644 --- a/examples/addition-iam-policies/main.tf +++ b/examples/addition-iam-policies/main.tf @@ -1,7 +1,7 @@ module "runners" { source = "../../" - name = "${var.source_name}-github-runner" + name = "${var.name}-github-runner" source_location = var.source_location github_personal_access_token_ssm_parameter = var.github_personal_access_token_ssm_parameter diff --git a/examples/addition-iam-policies/variables.tf b/examples/addition-iam-policies/variables.tf index 7829f75..7e8492e 100644 --- a/examples/addition-iam-policies/variables.tf +++ b/examples/addition-iam-policies/variables.tf @@ -1,27 +1,24 @@ -variable "account_id" { - type = string -} - -variable "region" { - type = string -} - variable "source_location" { - type = string + type = string + description = "Your source code repo location, for example https://github.com/my/repo.git" } -variable "source_name" { - type = string +variable "name" { + type = string + description = "Name used as a prefix for all resources in this module" } variable "github_personal_access_token_ssm_parameter" { - type = string + type = string + description = "The GitHub personal access token to use for accessing the repository" } variable "vpc_id" { - type = string + type = string + description = "The VPC ID for AWS Codebuild to launch ephemeral instances in." } variable "subnet_ids" { - type = list(string) + type = list(string) + description = "The list of Subnet IDs for AWS Codebuild to launch ephemeral EC2 instances in." } \ No newline at end of file diff --git a/examples/multiple-runners/main.tf b/examples/multiple-runners/main.tf index c6b8851..1224f04 100644 --- a/examples/multiple-runners/main.tf +++ b/examples/multiple-runners/main.tf @@ -3,12 +3,12 @@ module "runners" { source = "../../" - name = "${each.value.source_name}-github-runner" + name = "${each.value.source_name}-github-runner" + + source_location = each.value.source_location - source_location = each.value.source_location - github_personal_access_token_ssm_parameter = var.github_personal_access_token_ssm_parameter - vpc_id = var.vpc_id - subnet_ids = var.subnet_ids + vpc_id = var.vpc_id + subnet_ids = var.subnet_ids } diff --git a/examples/multiple-runners/variables.tf b/examples/multiple-runners/variables.tf index 3945244..f85c192 100644 --- a/examples/multiple-runners/variables.tf +++ b/examples/multiple-runners/variables.tf @@ -3,6 +3,7 @@ variable "source_locations" { source_location = string source_name = string })) + description = "Map of source locations to use when creating runners" default = { example-1 = { "source_name" = "example-1" @@ -16,13 +17,16 @@ variable "source_locations" { } variable "github_personal_access_token_ssm_parameter" { - type = string + type = string + description = "The GitHub personal access token to use for accessing the repository" } variable "vpc_id" { - type = string + type = string + description = "The VPC ID for AWS Codebuild to launch ephemeral instances in." } variable "subnet_ids" { - type = list(string) + type = list(string) + description = "The list of Subnet IDs for AWS Codebuild to launch ephemeral EC2 instances in." } \ No newline at end of file