Эх сурвалжийг харах

Fixes issues with indexer clusters without private HEC not applying

To be tagged v1.10.17
Fred Damstra 4 жил өмнө
parent
commit
422a44446e

+ 9 - 2
base/codebuild_artifact/README.md

@@ -1,6 +1,6 @@
-# How to Use this Module
+ How to Use this Module
 
-This module is where the CodeBuild artifacts are created. It uses the Terraform GitHub Provider and requires a Personal Access Token. This should be your Personal Access Token not mdr-aws-codebuild's token. The provider will look in the environmental variables for the token. 
+This module is where the CodeBuild artifacts are created. It uses the Terraform GitHub Provider and requires a Personal Access Token. This should be your Personal Access Token not mdr-aws-codebuild's token (see how-to below). The provider will look in the environmental variables for the token. 
 
 ```
 export GITHUB_TOKEN=<gihub_token>
@@ -13,3 +13,10 @@ This module should NOT create the github repo. That is a manual process. I am no
 AWS CodeBuild needs a Github Personal Access Token to pull code after the code in a repository has been updated. Terraform is capable of storing the Github Personal Access Token, but that is a bad idea. A better idea is a service account in Github that gives CodeBuild access to specific repositories. This user will need access to repositories in different organizations. The login credentials as well as the Personal Access Token for mdr-aws-codebuild are stored in Vault. 
 
 The service account (mdr-aws-codebuild) needs to have a personal access token manually placed into the aws console. 
+
+## Creating a Personal Access Token
+
+1) In github, go to `settings->Developer Settings->Personal Access Tokens`
+2) Click 'Generate Token'
+3) Give it a name (e.g. `terragrunt`)
+4) TBD.. which permissions are needed?

+ 1 - 1
base/shared_ami_key/main.tf

@@ -12,7 +12,7 @@ locals {
 
   buckets = [
     for bucket in concat([ aws_s3_bucket.xdr-shared-amis.arn ], var.vmimport_extra_buckets):
-      "${bucket}"
+      bucket
   ]
   bucket_contents = [
     for bucket in concat([ aws_s3_bucket.xdr-shared-amis.arn ], var.vmimport_extra_buckets):

+ 2 - 1
base/splunk_servers/indexer_cluster/elb-private.tf

@@ -29,7 +29,8 @@ resource "aws_acm_certificate" "hec_pvt_cert" {
 }
 
 resource "aws_acm_certificate_validation" "hec_pvt_cert_validation" {
-  certificate_arn         = var.splunk_private_hec ? aws_acm_certificate.hec_pvt_cert[0].arn : ""
+  count = var.splunk_private_hec ? 1 : 0
+  certificate_arn         = aws_acm_certificate.hec_pvt_cert[count.index].arn
   validation_record_fqdns = [for record in aws_route53_record.hec_pvt_cert_validation: record.fqdn] # will be empty if not moose
 }