Skip to content

Commit

Permalink
Merge pull request #11 from clouddrove/0.14
Browse files Browse the repository at this point in the history
0.14
  • Loading branch information
Sohan Yadav committed Apr 28, 2021
2 parents c2c4d2a + 2dfd1a6 commit 8181c90
Show file tree
Hide file tree
Showing 14 changed files with 177 additions and 159 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
python-version: '3.x'

- name: 'create readme'
uses: 'clouddrove/github-actions@v4.0'
uses: 'clouddrove/github-actions@v6.0'
with:
actions_subcommand: 'readme'
github_token: '${{ secrets.GITHUB}}'
Expand All @@ -35,7 +35,7 @@ jobs:
continue-on-error: true

- name: 'push readme'
uses: 'clouddrove/github-actions@v4.0'
uses: 'clouddrove/github-actions@v6.0'
continue-on-error: true
with:
actions_subcommand: 'push'
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,60 +20,60 @@ jobs:
aws-region: us-east-2

- name: 'Terraform Format'
uses: 'clouddrove/github-actions@v4.0'
uses: 'clouddrove/github-actions@v6.0'
with:
actions_subcommand: 'fmt'

- name: 'Terraform init for alb'
uses: 'clouddrove/github-actions@v4.0'
uses: 'clouddrove/github-actions@v6.0'
with:
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/alb

- name: 'Terraform validate for alb'
uses: 'clouddrove/github-actions@v4.0'
uses: 'clouddrove/github-actions@v6.0'
with:
actions_subcommand: 'validate'
tf_actions_working_dir: ./_example/alb

- name: 'Terraform plan for alb'
uses: 'clouddrove/github-actions@v4.0'
uses: 'clouddrove/github-actions@v6.0'
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example/alb

- name: 'Terraform init for clb'
uses: 'clouddrove/github-actions@v4.0'
uses: 'clouddrove/github-actions@v6.0'
with:
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/clb

- name: 'Terraform validate for clb'
uses: 'clouddrove/github-actions@v4.0'
uses: 'clouddrove/github-actions@v6.0'
with:
actions_subcommand: 'validate'
tf_actions_working_dir: ./_example/clb

- name: 'Terraform plan for clb'
uses: 'clouddrove/github-actions@v4.0'
uses: 'clouddrove/github-actions@v6.0'
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example/clb

- name: 'Terraform init for nlb'
uses: 'clouddrove/github-actions@v4.0'
uses: 'clouddrove/github-actions@v6.0'
with:
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/nlb

- name: 'Terraform validate for nlb'
uses: 'clouddrove/github-actions@v4.0'
uses: 'clouddrove/github-actions@v6.0'
with:
actions_subcommand: 'validate'
tf_actions_working_dir: ./_example/nlb

- name: 'Terraform plan for nlb'
uses: 'clouddrove/github-actions@v4.0'
uses: 'clouddrove/github-actions@v6.0'
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example/nlb
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
*.tfstate.backup
.terraform
.idea
*.iml
*.iml
*.terraform.lock.hcl
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.43.0
rev: v1.45.0
hooks:
- id: terraform_fmt

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v3.4.0
hooks:
- id: check-merge-conflict
- id: check-yaml
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Cloud Drove
Copyright (c) 2021 Cloud Drove

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Terraform AWS ALB
</h1>

<p align="center" style="font-size: 1.2rem;">
<p align="center" style="font-size: 1.2rem;">
This terraform module is used to create ALB on AWS.
</p>

Expand Down Expand Up @@ -38,7 +38,7 @@
<hr>


We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.
We eat, drink, sleep and most importantly love **DevOps**. We are working towards strategies for standardizing architecture while ensuring security for the infrastructure. We are strong believer of the philosophy <b>Bigger problems are always solved by breaking them into smaller manageable problems</b>. Resonating with microservices architecture, it is considered best-practice to run database, cluster, storage in smaller <b>connected yet manageable pieces</b> within the infrastructure.

This module is basically combination of [Terraform open source](https://www.terraform.io/) and includes automatation tests and examples. It also helps to create and improve your infrastructure with minimalistic code instead of maintaining the whole infrastructure code yourself.

Expand All @@ -49,7 +49,7 @@ We have [*fifty plus terraform modules*][terraform_modules]. A few of them are c

## Prerequisites

This module has a few dependencies:
This module has a few dependencies:

- [Terraform 0.13](https://learn.hashicorp.com/terraform/getting-started/install.html)
- [Go](https://golang.org/doc/install)
Expand Down Expand Up @@ -291,7 +291,7 @@ Here are examples of how you can use this module in your inventory structure:


## Testing
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.
In this module testing is performed with [terratest](https://github.com/gruntwork-io/terratest) and it creates a small piece of infrastructure, matches the output like ARN, ID and Tags name etc and destroy infrastructure in your AWS account. This testing is written in GO, so you need a [GO environment](https://golang.org/doc/install) in your system.

You need to run the following command in the testing folder:
```hcl
Expand All @@ -300,7 +300,7 @@ You need to run the following command in the testing folder:



## Feedback
## Feedback
If you come accross a bug or have any feedback, please log it in our [issue tracker](https://github.com/clouddrove/terraform-aws-alb/issues), or feel free to drop us an email at [hello@clouddrove.com](mailto:hello@clouddrove.com).

If you have found it worth your time, go ahead and give us a ★ on [our GitHub](https://github.com/clouddrove/terraform-aws-alb)!
Expand Down
21 changes: 6 additions & 15 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ github_repo: clouddrove/terraform-aws-alb
# Badges to display
badges:
- name: "Terraform"
image: "https://img.shields.io/badge/Terraform-v0.13-green"
image: "https://img.shields.io/badge/Terraform-v0.14-green"
url: "https://www.terraform.io"
- name: "Licence"
image: "https://img.shields.io/badge/License-MIT-blue.svg"
Expand All @@ -37,11 +37,8 @@ usage : |-
```hcl
module "alb" {
source = "clouddrove/alb/aws"
version = "0.13.0"
version = "0.14.0"
name = "alb"
application = "clouddrove"
environment = "test"
label_order = ["environment", "application", "name"]
internal = false
load_balancer_type = "application"
instance_count = module.ec2.instance_count
Expand Down Expand Up @@ -82,11 +79,8 @@ usage : |-
```hcl
module "alb" {
source = "clouddrove/alb/aws"
version = "0.13.0"
version = "0.14.0"
name = "nlb"
application = "clouddrove"
environment = "test"
label_order = ["environment", "application", "name"]
internal = false
load_balancer_type = "application"
instance_count = module.ec2.instance_count
Expand Down Expand Up @@ -129,12 +123,9 @@ usage : |-
### CLB Example
```hcl
module "clb" {
source = "clouddrove/alb/aws"
version = "0.13.0"
name = "clb"
application = "clouddrove"
environment = "test"
label_order = ["environment", "application", "name"]
source = "clouddrove/alb/aws"
version = "0.14.0"
name = "clb"
load_balancer_type = "classic"
internal = false
Expand Down
68 changes: 37 additions & 31 deletions _example/alb/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,26 @@ provider "aws" {
}

module "vpc" {
source = "clouddrove/vpc/aws"
version = "0.13.0"
source = "clouddrove/vpc/aws"
version = "0.14.0"

name = "vpc"
application = "clouddrove"
repository = "https://github.com/clouddrove/terraform-aws-vpc"
environment = "test"
label_order = ["environment", "application", "name"]
label_order = ["name", "environment"]

cidr_block = "172.16.0.0/16"
}

module "public_subnets" {
source = "clouddrove/subnet/aws"
version = "0.13.0"
source = "clouddrove/subnet/aws"
version = "0.14.0"

name = "public-subnet"
application = "clouddrove"
repository = "https://github.com/clouddrove/terraform-aws-subnet"
environment = "test"
label_order = ["environment", "application", "name"]
label_order = ["name", "environment"]


availability_zones = ["eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
Expand All @@ -30,38 +33,44 @@ module "public_subnets" {
}

module "http_https" {
source = "clouddrove/security-group/aws"
version = "0.13.0"
source = "clouddrove/security-group/aws"
version = "0.14.0"

name = "http-https"
application = "clouddrove"
repository = "https://github.com/clouddrove/terraform-aws-security-group"
environment = "test"
label_order = ["environment", "application", "name"]
label_order = ["name", "environment"]


vpc_id = module.vpc.vpc_id
allowed_ip = ["0.0.0.0/0"]
allowed_ports = [80, 443]
}

module "ssh" {
source = "clouddrove/security-group/aws"
version = "0.13.0"
source = "clouddrove/security-group/aws"
version = "0.14.0"

name = "ssh"
application = "clouddrove"
repository = "https://github.com/clouddrove/terraform-aws-security-group"
environment = "test"
label_order = ["environment", "application", "name"]
label_order = ["name", "environment"]


vpc_id = module.vpc.vpc_id
allowed_ip = [module.vpc.vpc_cidr_block]
allowed_ports = [22]
}

module "iam-role" {
source = "clouddrove/iam-role/aws"
version = "0.13.0"
name = "iam-role"
application = "clouddrove"
environment = "test"
label_order = ["environment", "application", "name"]
source = "clouddrove/iam-role/aws"
version = "0.14.0"

name = "iam-role"
repository = "https://github.com/clouddrove/terraform-aws-iam-role"
environment = "test"
label_order = ["name", "environment"]

assume_role_policy = data.aws_iam_policy_document.default.json

policy_enabled = true
Expand Down Expand Up @@ -93,12 +102,13 @@ data "aws_iam_policy_document" "iam-policy" {
}

module "ec2" {
source = "clouddrove/ec2/aws"
version = "0.13.0"
source = "clouddrove/ec2/aws"
version = "0.14.0"

name = "ec2-instance"
application = "clouddrove"
repository = "https://github.com/clouddrove/terraform-aws-ec2"
environment = "test"
label_order = ["environment", "application", "name"]
label_order = ["name", "environment"]

instance_count = 2
ami = "ami-08d658f84a6d84a80"
Expand Down Expand Up @@ -126,11 +136,7 @@ module "ec2" {
module "alb" {
source = "./../../"

name = "alb"
application = "clouddrove"
environment = "test"
label_order = ["environment", "application", "name"]

name = "alb"
enable = true
internal = false
load_balancer_type = "application"
Expand Down
Loading

0 comments on commit 8181c90

Please sign in to comment.