Skip to content

Commit

Permalink
Remove aws provider from the module and update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Martinez committed Feb 10, 2022
1 parent 378f6be commit 4b6ede2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 18 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Check the [Product Documentation](https://campus.barracuda.com/product/cloudgena
## Misc

- This repository has [pre-commit](https://github.com/antonbabenko/pre-commit-terraform) configured
- Test all the pre-commit hooks with `pre-commit run -a`
- Test all the pre-commit hooks with:
- `docker run -v $(pwd):/lint -w /lint ghcr.io/antonbabenko/pre-commit-terraform:latest run -a`
- Cleanup, in case of plugin issues: `find . -name ".terraform*" -print0 | xargs -0 rm -r`
- Test github actions with [nektos/act](https://github.com/nektos/act)

## Links
Expand Down
1 change: 1 addition & 0 deletions modules/aws-asg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,4 @@ No modules.
| Name | Description |
|------|-------------|
| <a name="output_Network_Load_Balancer_DNS_Name"></a> [Network\_Load\_Balancer\_DNS\_Name](#output\_Network\_Load\_Balancer\_DNS\_Name) | Update the CloudGen Access Proxy in the Console with this DNS name |
| <a name="output_Security_Group_for_Resources"></a> [Security\_Group\_for\_Resources](#output\_Security\_Group\_for\_Resources) | Use this group to allow CloudGen Access Proxy access to internal resources |
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ No requirements.

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a |
| <a name="provider_tls"></a> [tls](#provider\_tls) | n/a |
| <a name="provider_aws"></a> [aws](#provider\_aws) | 3.74.1 |
| <a name="provider_tls"></a> [tls](#provider\_tls) | 3.1.0 |

## Modules

Expand Down Expand Up @@ -35,3 +35,4 @@ No requirements.
| Name | Description |
|------|-------------|
| <a name="output_Network_Load_Balancer_DNS_Name"></a> [Network\_Load\_Balancer\_DNS\_Name](#output\_Network\_Load\_Balancer\_DNS\_Name) | n/a |
| <a name="output_Security_Group_for_Resources"></a> [Security\_Group\_for\_Resources](#output\_Security\_Group\_for\_Resources) | n/a |
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,24 @@ locals {

provider "aws" {
region = local.aws_region
default_tags {
tags = {
Owner = "team"
Environment = "test"
}
}
}

#
# CloudGen Access Proxy
#

module "cloudgen-access-proxy" {
source = "git::git@github.com:barracuda-cloudgen-access/terraform-modules.git//modules/aws-asg?ref=v1.2.2"
source = "../../"

# More examples
# run 'rm -rf .terraform/' after changing source
# source = "git::git@github.com:barracuda-cloudgen-access/terraform-modules.git//modules/aws-asg?ref=vx.x.x"
# source = "git::git@github.com:barracuda-cloudgen-access/terraform-modules.git//modules/aws-asg?ref=<branch-name>"
# source = "../"

Expand All @@ -51,8 +58,7 @@ module "cloudgen-access-proxy" {
launch_cfg_key_pair_name = module.key_pair.key_pair_key_name

tags = {
Environment = "test"
Team = "awesome"
extra_tag = "extra-value"
}
}

Expand All @@ -68,7 +74,7 @@ output "Security_Group_for_Resources" {
# SSH key for instances
#

# (!) The private key will be saves in the terraform state file
# (!) The private key will be saved in the terraform state file
resource "tls_private_key" "private_key" {
algorithm = "RSA"
}
Expand Down Expand Up @@ -127,7 +133,7 @@ module "vpc" {
manage_default_security_group = true

tags = {
environment = local.application
extra_tag = "extra-value"
}

vpc_tags = {
Expand All @@ -139,8 +145,7 @@ resource "aws_default_route_table" "default" {
default_route_table_id = module.vpc.default_route_table_id

tags = {
Name = "${local.application}-default"
environment = local.application
warning = "This is created by AWS for the VPC and cannot be removed"
Name = "${local.application}-default"
warning = "This is created by AWS for the VPC and cannot be removed"
}
}
7 changes: 0 additions & 7 deletions modules/aws-asg/provider.tf

This file was deleted.

0 comments on commit 4b6ede2

Please sign in to comment.