Skip to content

Commit 50f54da

Browse files
committed
ecs-web/background: remove outdated github_anonymous var
- expose github_webhook_events var
1 parent 94e318c commit 50f54da

File tree

2 files changed

+18
-19
lines changed

2 files changed

+18
-19
lines changed

modules/ecs-background/variables.tf

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,17 +481,12 @@ variable "codepipeline_skip_deploy_step" {
481481
default = false
482482
}
483483

484-
variable "github_anonymous" {
485-
type = bool
486-
description = "Github Anonymous API (if `true`, token must not be set as GITHUB_TOKEN or `github_token`)"
487-
default = false
488-
}
489-
490484
variable "codepipeline_github_oauth_token" {
491485
type = string
492486
description = "GitHub OAuth Token with permissions to access private repositories"
493487
default = ""
494488
}
489+
495490
variable "codepipeline_github_webhook_events" {
496491
type = list(string)
497492
description = "A list of events which should trigger the webhook. See a list of [available events](https://developer.github.com/v3/activity/events/types/)"

modules/ecs-web/main.tf

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -575,16 +575,22 @@ module "ecs_codepipeline" {
575575
repo_owner = var.codepipeline_repo_owner
576576
repo_name = var.codepipeline_repo_name
577577
branch = var.codepipeline_branch
578-
build_image = var.codepipeline_build_image
579-
build_timeout = var.codepipeline_build_timeout
580-
build_compute_type = "BUILD_GENERAL1_SMALL"
581578
poll_source_changes = false
579+
webhook_enabled = var.codepipeline_webhook_enabled
580+
github_oauth_token = var.codepipeline_github_oauth_token
581+
github_webhook_events = var.codepipeline_github_webhook_events
582+
583+
build_image = var.codepipeline_build_image
584+
build_timeout = var.codepipeline_build_timeout
585+
build_compute_type = "BUILD_GENERAL1_SMALL"
582586
// True required to build docker containers
583-
privileged_mode = true
584-
image_repo_name = split("/", module.ecr.repository_url)[0]
585-
image_tag = "latest" // var.image_tag
586-
webhook_enabled = var.codepipeline_webhook_enabled
587+
privileged_mode = true
588+
589+
image_repo_name = split("/", module.ecr.repository_url)[0]
590+
image_tag = "latest" // var.image_tag
591+
587592
s3_bucket_force_destroy = true
593+
588594
environment_variables = concat(
589595
var.codepipeline_environment_variables,
590596
var.codepipeline_add_queue_env_vars ?
@@ -622,12 +628,10 @@ module "ecs_codepipeline" {
622628
}
623629
]
624630
)
625-
ecs_cluster_name = var.ecs_cluster_name
626-
service_name = module.ecs_task.service_name
627-
cache_type = var.codebuild_cache_type
628-
local_cache_modes = var.codebuild_local_cache_modes
629-
# github_anonymous = true
630-
github_oauth_token = ""
631+
ecs_cluster_name = var.ecs_cluster_name
632+
service_name = module.ecs_task.service_name
633+
cache_type = var.codebuild_cache_type
634+
local_cache_modes = var.codebuild_local_cache_modes
631635
codebuild_vpc_config = var.codebuild_vpc_config
632636

633637
context = module.this.context

0 commit comments

Comments
 (0)