Skip to content

Commit

Permalink
Merge pull request #5 from terraform-modules/compat-tf-0.13
Browse files Browse the repository at this point in the history
update for tf 0.13, add info to readm
  • Loading branch information
badra001 committed Dec 23, 2021
2 parents fd8f5f0 + 4ad5550 commit 1b26c93
Show file tree
Hide file tree
Showing 9 changed files with 151 additions and 10 deletions.
18 changes: 10 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
repos:
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.48.0
rev: v1.62.1
hooks:
# - id: terraform_validate
- id: terraform_fmt
exclude: examples
- id: terraform_docs_replace
args: ['table']
exclude: common/*.tf
# - id: terraform_docs_replace
# args: ['table']
- id: terraform_docs
args:
- --args=--config=.terraform-docs.yml
exclude: version.tf
exclude: examples
exclude: examples/
- id: terraform_tflint
args: [ "--args=--config=__GIT_WORKING_DIR__/.tflint.hcl"]
exclude: examples
exclude: examples/

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
rev: v4.0.1
hooks:
- id: check-symlinks
- id: detect-aws-credentials
Expand Down
45 changes: 45 additions & 0 deletions .terraform-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
formatter: markdown table

header-from: main.tf
footer-from: ""

sections:
## hide: []
show:
- data-sources
- header
- footer
- inputs
- modules
- outputs
- providers
- requirements
- resources

output:
file: README.md
mode: replace
# mode: inject
# template: |-
# <!-- BEGIN_TF_DOCS -->
# {{ .Content }}
# <!-- END_TF_DOCS -->

## output-values:
## enabled: false
## from: ""
##
## sort:
## enabled: true
## by: name
##
## settings:
## anchor: true
## color: true
## default: true
## description: false
## escape: true
## indent: 2
## required: true
## sensitive: true
## type: true
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Versions

## Version 1.x

* v1.0.0 -- 2021-10-14
- patch-aws-auth module creation

## Version 2.x

* v2.0.0 -- 20211223
- add providers for tf 0.13+


44 changes: 44 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# aws-eks

This contains a list of submodules used for building an EKS cluster. There are also some examples which can be used
as a starting point for building a cluster.

* Submodules
* [patch-aws-auth](#patch-aws-auth): update `aws-auth ConfigMap`

* Submodules Planned
* dns-zone: add DNS zone for cluster
* efs: Setup EFS Driver, policies and roles
* cluster-iam-policies: Setup needed IAM policies for cluster
* cluster-iam-roles: Setup needed IAM roles for cluster (in conjuniction with policies)
* irsa-role: Setup IAM Role for Service Account
* cluster-role: Setup cluster roles (depends upon a created irsa-role)
* common-services, most likely split into a module for each of the common services

* Examples
* [established-cluster-examples](#established-cluster-examples)
* [full-cluster](#full-cluster)

# Submodules
## [patch-aws-auth](patch-aws-auth/)

This submodule allows for an easy patching of the `aws-auth ConfigMap`, which is used to map IAM users and roles to specific
Kubernetes groups, roles, and cluster roles.

# Examples

## [established-cluster-examples](examples/established-cluster-examples/)

* [alb-controller](examples/established-cluster-examples/alb-controller)
* [dnsutils](examples/established-cluster-examples/dnsutils)
* [empty](examples/established-cluster-examples/empty)
* [kube-bench](examples/established-cluster-examples/kube-bench)
* [sample-alb](examples/established-cluster-examples/sample-alb)
* [sample-elb](examples/established-cluster-examples/sample-elb)
* [sample-istio](examples/established-cluster-examples/sample-istio)
* [sample-nlb](examples/established-cluster-examples/sample-nlb)

## [full-cluster](examples/full-cluster/)



2 changes: 1 addition & 1 deletion common/version.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
locals {
_module_version = "1.0.0"
_module_version = "2.0.0"
}
29 changes: 29 additions & 0 deletions common/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.66.0"
}
helm = {
source = "hashicorp/helm"
version = ">= 2.4"
}
http = {
source = "hashicorp/http"
version = ">= 2.1"
}
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 2.7"
}
null = {
source = "hashicorp/null"
version = ">= 3.1"
}
tls = {
source = "hashicorp/tls"
version = ">= 3.1"
}
}
# required_version = ">= 0.13"
}
5 changes: 4 additions & 1 deletion patch-aws-auth/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- BEGIN_TF_DOCS -->
# About patch-aws-auth

This allows to add IAM roles and IAM users to the `aws-auth ConfigMap`, to tie IAM resources into
Expand Down Expand Up @@ -66,14 +67,15 @@ module "awsauth_base_users" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.12.31 |
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 3.1 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | n/a |
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | n/a |
| <a name="provider_null"></a> [null](#provider\_null) | n/a |
| <a name="provider_null"></a> [null](#provider\_null) | >= 3.1 |

## Modules

Expand Down Expand Up @@ -111,3 +113,4 @@ No modules.
## Outputs

No outputs.
<!-- END_TF_DOCS -->
1 change: 1 addition & 0 deletions patch-aws-auth/version.tf
9 changes: 9 additions & 0 deletions patch-aws-auth/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
required_providers {
null = {
source = "hashicorp/null"
version = ">= 3.1"
}
}
# required_version = ">= 0.13"
}

0 comments on commit 1b26c93

Please sign in to comment.