Skip to content

Commit

Permalink
Merge pull request #34 from byu-oit/humio-tokens
Browse files Browse the repository at this point in the history
add humio tokens
  • Loading branch information
joshgubler authored Oct 27, 2021
2 parents 658fb7b + e0a7e5a commit 0069673
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This module retrieves some basic [ACS](https://github.com/byu-oit/aws-acs) infor

```hcl
module "acs" {
source = "github.com/byu-oit/terraform-aws-acs-info.git?ref=v3.2.0"
source = "github.com/byu-oit/terraform-aws-acs-info.git?ref=v3.3.0"
}
```

Expand Down Expand Up @@ -54,6 +54,8 @@ After defining the module you can then retrieve the information you need (see av
| db_subnet_group | [object](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/db_subnet_group) | The database subnet group for RDS in the specified VPC object |
| ssh_rdp_security_group | [object](https://www.terraform.io/docs/providers/aws/d/security_group.html) | The security group to enable SSH/RDP access to resources in the specified VPC object |
| oracle_security_group | [object](https://www.terraform.io/docs/providers/aws/d/security_group.html) | The security group to enable Oracle access to resources in the specified VPC object |
| github_token | string | The token to use in CI/CD pipelines to fetch source code from GitHub (this if only available in certain AWS accounts) |
| github_token | string | The token to use in CI/CD pipelines to fetch source code from GitHub (this is only available in certain AWS accounts) |
| humio_dev_token | string | The token to use to ship logs to dev instance of Humio (this is only available in certain AWS accounts) |
| humio_prd_token | string | The token to use to ship logs to prd instance of Humio (this is only available in certain AWS accounts) |

**Note about returning objects**: Because objects are returned (as opposed to just values), autocomplete may not work. Just add on the key to the end out the output accessor. Even though autocomplete won't work, those values will still be correctly returned.
6 changes: 6 additions & 0 deletions examples/ci-12/ci.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,9 @@ output "oracle_security_group" {
output "github_token" {
value = module.acs.github_token
}
output "humio_dev_token" {
value = module.acs.humio_dev_token
}
output "humio_prd_token" {
value = module.acs.humio_prd_token
}
6 changes: 6 additions & 0 deletions examples/ci-13/ci.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,9 @@ output "oracle_security_group" {
output "github_token" {
value = module.acs.github_token
}
output "humio_dev_token" {
value = module.acs.humio_dev_token
}
output "humio_prd_token" {
value = module.acs.humio_prd_token
}
8 changes: 7 additions & 1 deletion examples/simple/simple.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ provider "aws" {
}

module "acs" {
source = "github.com/byu-oit/terraform-aws-acs-info?ref=v3.2.0"
source = "github.com/byu-oit/terraform-aws-acs-info?ref=v3.3.0"
}

output "vpc_id" {
Expand Down Expand Up @@ -37,3 +37,9 @@ output "cert_arn" {
output "github_token" {
value = module.acs.github_token
}
output "humio_dev_token" {
value = module.acs.humio_dev_token
}
output "humio_prd_token" {
value = module.acs.humio_prd_token
}
2 changes: 2 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ locals {
zone_id = lookup(local.acs_info, "/acs/dns/zone-id", null)
oracle_security_group_id = lookup(local.acs_info, "/acs/vpc/xinetd-sg-id", null)
github_token = lookup(local.acs_info, "/acs/git/token", null)
humio_dev_token = lookup(local.acs_info, "/acs/humio/dev/token", null)
humio_prd_token = lookup(local.acs_info, "/acs/humio/prd/token", null)
}

// IAM info
Expand Down
11 changes: 10 additions & 1 deletion output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,16 @@ output "oracle_security_group" {
value = local.oracle_security_group_id != null ? data.aws_security_group.oracle[0] : null
}

// CodePipeline outputs
// Integration token outputs
output "github_token" {
value = local.github_token # there's no data source, so no need for the null check
}

output "humio_dev_token" {
value = local.humio_dev_token # there's no data source, so no need for the null check
}

output "humio_prd_token" {
value = local.humio_prd_token # there's no data source, so no need for the null check
}

0 comments on commit 0069673

Please sign in to comment.