Skip to content

Commit

Permalink
Merge pull request #35 from byu-oit/elasticache
Browse files Browse the repository at this point in the history
output elasticache subnet group name
  • Loading branch information
joshgubler authored Oct 27, 2021
2 parents 0069673 + eb8427a commit cfe16ca
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion 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.3.0"
source = "github.com/byu-oit/terraform-aws-acs-info.git?ref=v3.4.0"
}
```

Expand Down Expand Up @@ -52,6 +52,7 @@ After defining the module you can then retrieve the information you need (see av
| certificate_virginia | [object](https://www.terraform.io/docs/providers/aws/d/acm_certificate.html#attributes-reference) | The default zone's ACM certificate for us-east-1 (needed by CloudFront, API Gateway, etc.) object |
| db_subnet_group_name | string | **Deprecated** Use `db_subnet_group.name` |
| 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 |
| elasticache_subnet_group_name | string | The name of the subnet group for Elasticache in the specified VPC. |
| 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 is only available in certain AWS accounts) |
Expand Down
3 changes: 3 additions & 0 deletions examples/ci-12/ci.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ output "db_subnet_group_name" {
output "db_subnet_group" {
value = module.acs.db_subnet_group
}
output "elasticache_subnet_group_name" {
value = module.acs.elasticache_subnet_group_name
}
output "ssh_rdp_security_group" {
value = module.acs.ssh_rdp_security_group
}
Expand Down
3 changes: 3 additions & 0 deletions examples/ci-13/ci.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ output "db_subnet_group_name" {
output "db_subnet_group" {
value = module.acs.db_subnet_group
}
output "elasticache_subnet_group_name" {
value = module.acs.elasticache_subnet_group_name
}
output "ssh_rdp_security_group" {
value = module.acs.ssh_rdp_security_group
}
Expand Down
2 changes: 1 addition & 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.3.0"
source = "github.com/byu-oit/terraform-aws-acs-info?ref=v3.4.0"
}

output "vpc_id" {
Expand Down
10 changes: 8 additions & 2 deletions output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ output "certificate_virginia" {
value = local.zone_id != null ? data.aws_acm_certificate.virginia[0] : null
}

// RDS Outputs
// RDS outputs
output "db_subnet_group_name" {
// Terraform didn't used to have a data accessor for this, so the best we could do was return the name
// Keeping for backwards compatibility
Expand All @@ -57,7 +57,13 @@ output "db_subnet_group" {
value = data.aws_db_subnet_group.db_subnet_group
}

// Security Group Outputs
//Elasticache outputs
output "elasticache_subnet_group_name" {
// Terraform doesn't have a data accessor for this, so the best we can do is return the name
value = "${local.vpc_name}-elasticache-subnet-group"
}

// Security Group outputs
output "ssh_rdp_security_group" {
value = data.aws_security_group.ssh_rdp
}
Expand Down

0 comments on commit cfe16ca

Please sign in to comment.