Skip to content

Commit

Permalink
updates for tf-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewchees committed Nov 29, 2024
1 parent 4ba2db5 commit c8a0626
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion examples/addition-iam-policies/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion examples/addition-iam-policies/main.tf
Original file line number Diff line number Diff line change
@@ -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
Expand Down
25 changes: 11 additions & 14 deletions examples/addition-iam-policies/variables.tf
Original file line number Diff line number Diff line change
@@ -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."
}
10 changes: 5 additions & 5 deletions examples/multiple-runners/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
10 changes: 7 additions & 3 deletions examples/multiple-runners/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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."
}

0 comments on commit c8a0626

Please sign in to comment.