Skip to content

Commit

Permalink
Merge pull request #7 from clouddrove/0.14
Browse files Browse the repository at this point in the history
upgrade to 0.14
  • Loading branch information
Nikita Dugar authored Apr 13, 2021
2 parents 331571a + a4aa5b9 commit f6b02a4
Show file tree
Hide file tree
Showing 9 changed files with 113 additions and 71 deletions.
64 changes: 44 additions & 20 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,81 @@ on:
- master

jobs:
terraform:
name: 'Terraform'
fmt:
name: 'terraform fmt'
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master

- name: Configure AWS Credentials
- name: 'Terraform Format'
uses: 'clouddrove/[email protected]'
with:
actions_subcommand: 'fmt'

multi-node:
name: 'multi-node'
needs: fmt
runs-on: ubuntu-latest
steps:

- name: 'Checkout'
uses: actions/checkout@master

- name: 'Configure AWS Credentials'
uses: clouddrove/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
aws-region: us-east-2

- name: 'Terraform Format'
uses: 'clouddrove/[email protected]'
with:
actions_subcommand: 'fmt'

- name: 'Terraform init Multi node'
uses: 'clouddrove/[email protected]'
- name: 'Terraform init multi-node'
uses: 'clouddrove/[email protected]'
with:
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/multi-node

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

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

- name: 'Terraform init Single'
uses: 'clouddrove/[email protected]'
single-node:
name: 'single-node'
needs: fmt
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@master

- name: 'Configure AWS Credentials'
uses: clouddrove/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.TEST_AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.TEST_AWS_ACCESS_SECRET_KEY }}
aws-region: us-east-2

- name: 'Terraform init single-node'
uses: 'clouddrove/[email protected]'
with:
actions_subcommand: 'init'
tf_actions_working_dir: ./_example/single-node

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

- name: 'Terraform plan Single'
uses: 'clouddrove/github-actions@v4.0'
- name: 'Terraform plan single-node'
uses: 'clouddrove/github-actions@v6.0'
with:
actions_subcommand: 'plan'
tf_actions_working_dir: ./_example/single-node
Expand Down
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
14 changes: 7 additions & 7 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ github_repo: clouddrove/terraform-aws-elasticsearch
# 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 @@ -38,11 +38,11 @@ usage: |-
```hcl
module "elasticsearch" {
source = "clouddrove/elasticsearch/aws"
version = "0.13.0"
version = "0.14.0"
name = "es"
application = "clouddrove"
repository = "https://registry.terraform.io/modules/clouddrove/elasticsearch/aws/0.14.0"
environment = "test"
label_order = ["environment", "application", "name"]
label_order = ["name", "environment"]
enable_iam_service_linked_role = true
security_group_ids = [module.security_group.security_group_ids]
subnet_ids = tolist(module.public_subnets.public_subnet_id)
Expand Down Expand Up @@ -70,11 +70,11 @@ usage: |-
```hcl
module "elasticsearch" {
source = "clouddrove/elasticsearch/aws"
version = "0.13.0"
version = "0.14.0"
name = "es"
application = "clouddrove"
repository = "https://registry.terraform.io/modules/clouddrove/elasticsearch/aws/0.14.0"
environment = "test"
label_order = ["environment", "name", "application"]
label_order = ["name", "environment"]
domain_name = "clouddrove"
enable_iam_service_linked_role = true
security_group_ids = [module.security_group.security_group_ids]
Expand Down
25 changes: 12 additions & 13 deletions _example/multi-node/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,23 @@ provider "aws" {

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

name = "vpc"
application = "clouddrove"
repository = "https://registry.terraform.io/modules/clouddrove/vpc/aws/0.14.0"
environment = "test"
label_order = ["environment", "name", "application"]

cidr_block = "172.16.0.0/16"
label_order = ["name", "environment"]
cidr_block = "172.16.0.0/16"
}

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

name = "public-subnet"
application = "clouddrove"
repository = "https://registry.terraform.io/modules/clouddrove/subnet/aws/0.14.0"
environment = "test"
label_order = ["environment", "name", "application"]
label_order = ["name", "environment"]

availability_zones = ["eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
Expand All @@ -33,12 +32,12 @@ module "public_subnets" {

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

name = "ingress_security_groups"
application = "clouddrove"
repository = "https://registry.terraform.io/modules/clouddrove/security-group/aws/0.14.0"
environment = "test"
label_order = ["environment", "name", "application"]
label_order = ["name", "environment"]

vpc_id = module.vpc.vpc_id
allowed_ip = ["0.0.0.0/0"]
Expand All @@ -48,9 +47,9 @@ module "security_group" {
module "elasticsearch" {
source = "../../"
name = "es"
application = "clouddrove"
repository = "https://registry.terraform.io/modules/clouddrove/elasticsearch/aws/0.14.0"
environment = "test"
label_order = ["environment", "name", "application"]
label_order = ["name", "environment"]
domain_name = "clouddrove"
enable_iam_service_linked_role = true
security_group_ids = [module.security_group.security_group_ids]
Expand Down
22 changes: 11 additions & 11 deletions _example/single-node/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ provider "aws" {

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


name = "vpc"
application = "clouddrove"
repository = "https://registry.terraform.io/modules/clouddrove/vpc/aws/0.14.0"
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"
version = "0.14.0"

name = "public-subnet"
application = "clouddrove"
repository = "https://registry.terraform.io/modules/clouddrove/subnet/aws/0.14.0"
environment = "test"
label_order = ["environment", "application", "name"]
label_order = ["name", "environment"]

availability_zones = ["eu-west-1c"]
vpc_id = module.vpc.vpc_id
Expand All @@ -34,12 +34,12 @@ module "public_subnets" {

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

name = "ingress_security_groups"
application = "clouddrove"
repository = "https://registry.terraform.io/modules/clouddrove/security-group/aws/0.14.0"
environment = "test"
label_order = ["environment", "application", "name"]
label_order = ["name", "environment"]

vpc_id = module.vpc.vpc_id
allowed_ip = ["0.0.0.0/0"]
Expand All @@ -49,9 +49,9 @@ module "security_group" {
module "elasticsearch" {
source = "../../"
name = "es"
application = "clouddrove"
repository = "https://registry.terraform.io/modules/clouddrove/elasticsearch/aws/0.14.0"
environment = "test"
label_order = ["environment", "application", "name"]
label_order = ["name", "environment"]
enable_iam_service_linked_role = true
security_group_ids = [module.security_group.security_group_ids]
subnet_ids = tolist(module.public_subnets.public_subnet_id)
Expand Down
14 changes: 8 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
# tags for resources. You can use terraform-labels to implement a strict
# naming convention.
module "labels" {
source = "git::https://github.com/clouddrove/terraform-labels.git?ref=tags/0.12.0"
source = "git::https://github.com/clouddrove/terraform-labels.git?ref=tags/0.14.0"

enabled = var.enabled
name = var.name
application = var.application
repository = var.repository
environment = var.environment
managedby = var.managedby
attributes = var.attributes
label_order = var.label_order
}

Expand Down Expand Up @@ -99,7 +101,7 @@ resource "aws_elasticsearch_domain" "default" {
}

encrypt_at_rest {
enabled = false
enabled = var.encrypt_at_rest_enabled
kms_key_id = var.kms_key_id
}

Expand Down Expand Up @@ -242,7 +244,7 @@ resource "aws_elasticsearch_domain" "single" {
}

encrypt_at_rest {
enabled = false
enabled = var.encrypt_at_rest_enabled
kms_key_id = var.kms_key_id
}

Expand Down Expand Up @@ -389,7 +391,7 @@ resource "aws_elasticsearch_domain_policy" "default" {
#Module : ROUTE53
#Description : Provides a Route53 record resource.
module "es_dns" {
source = "git::https://github.com/clouddrove/terraform-aws-route53-record.git?ref=tags/0.12.1"
source = "git::https://github.com/clouddrove/terraform-aws-route53-record.git?ref=tags/0.14.0"
record_enabled = var.dns_enabled
zone_id = var.dns_zone_id
name = var.es_hostname
Expand All @@ -400,7 +402,7 @@ module "es_dns" {
#Module : ROUTE53
#Description : Provides a Route53 record resource.
module "kibana_dns" {
source = "git::https://github.com/clouddrove/terraform-aws-route53-record.git?ref=tags/0.12.1"
source = "git::https://github.com/clouddrove/terraform-aws-route53-record.git?ref=tags/0.14.0"
record_enabled = var.dns_enabled
zone_id = var.dns_zone_id
name = var.kibana_hostname
Expand Down
Loading

0 comments on commit f6b02a4

Please sign in to comment.