From dd10879b1d29a718d91f6981a5fda407cf3d906c Mon Sep 17 00:00:00 2001 From: Andrej Krnac <6131252+adys@users.noreply.github.com> Date: Wed, 7 Oct 2020 12:59:18 +0200 Subject: [PATCH] Bump pre-commit hook versions --- .pre-commit-config.yaml | 8 +- .secrets.baseline | 5 +- README.md | 14 +- examples/basic/{README.md => README.md.off} | 6 +- examples/basic/{main.tf => main.tf.off} | 121 +++++++++--------- examples/basic/{outputs.tf => outputs.tf.off} | 1 + examples/basic/providers.tf | 30 ----- examples/basic/providers.tf.off | 31 +++++ 8 files changed, 112 insertions(+), 104 deletions(-) rename examples/basic/{README.md => README.md.off} (94%) rename examples/basic/{main.tf => main.tf.off} (52%) rename examples/basic/{outputs.tf => outputs.tf.off} (87%) delete mode 100644 examples/basic/providers.tf create mode 100644 examples/basic/providers.tf.off diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c38b2a8..61d7383 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.1.0 + rev: v3.2.0 hooks: - id: trailing-whitespace - id: check-merge-conflict @@ -10,13 +10,13 @@ repos: - id: end-of-file-fixer - repo: https://github.com/gruntwork-io/pre-commit - rev: v0.1.9 + rev: v0.1.10 hooks: - id: tflint - id: terraform-validate - repo: git://github.com/antonbabenko/pre-commit-terraform - rev: v1.31.0 + rev: v1.43.0 hooks: - id: terraform_fmt - id: terraform_docs @@ -29,7 +29,7 @@ repos: - id: terraform-vars - repo: https://github.com/Yelp/detect-secrets - rev: v0.13.1 + rev: v0.14.3 hooks: - id: detect-secrets args: ['--baseline', '.secrets.baseline'] diff --git a/.secrets.baseline b/.secrets.baseline index 9f69c02..0c9b588 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -1,9 +1,10 @@ { + "custom_plugin_paths": [], "exclude": { "files": null, "lines": null }, - "generated_at": "2020-06-29T14:20:55Z", + "generated_at": "2020-10-07T11:13:07Z", "plugins_used": [ { "name": "AWSKeyDetector" @@ -58,7 +59,7 @@ } ], "results": {}, - "version": "0.13.1", + "version": "0.14.3", "word_list": { "file": null, "hash": null diff --git a/README.md b/README.md index 8c866e8..72f333b 100644 --- a/README.md +++ b/README.md @@ -25,12 +25,20 @@ are set to `true` (see `settings` input variable). Otherwise, you must set | Name | Version | |------|---------| -| terraform | ~> 0.12.0 | -| aws | ~> 2.0 | -| helm | ~> 1.0 | +| terraform | >= 0.12.26, < 0.14.0 | +| aws | >= 2.0, < 4.0 | +| helm | >= 1.0, < 1.4.0 | | local | ~> 1.2 | | null | ~> 2.0 | +## Providers + +| Name | Version | +|------|---------| +| aws | >= 2.0, < 4.0 | +| helm | >= 1.0, < 1.4.0 | +| kubernetes | n/a | + ## Inputs | Name | Description | Type | Default | Required | diff --git a/examples/basic/README.md b/examples/basic/README.md.off similarity index 94% rename from examples/basic/README.md rename to examples/basic/README.md.off index daad1e4..714c4ed 100644 --- a/examples/basic/README.md +++ b/examples/basic/README.md.off @@ -17,11 +17,7 @@ It is highly inspired by AWS ALB Ingress Controller [walkthrough: echoserver](ht ## Requirements -| Name | Version | -|------|---------| -| aws | ~> 2.0 | -| helm | ~> 1.0 | -| kubernetes | ~> 1.10 | +No requirements. ## Inputs diff --git a/examples/basic/main.tf b/examples/basic/main.tf.off similarity index 52% rename from examples/basic/main.tf rename to examples/basic/main.tf.off index f1dcbbb..9f102cb 100644 --- a/examples/basic/main.tf +++ b/examples/basic/main.tf.off @@ -1,63 +1,64 @@ -data "aws_region" "current" {} - -module "vpc" { - source = "terraform-aws-modules/vpc/aws" - - name = "alb-ingress-vpc" - cidr = "10.0.0.0/16" - azs = ["eu-central-1a", "eu-central-1b"] - public_subnets = ["10.0.101.0/24", "10.0.102.0/24"] - enable_nat_gateway = true -} - -module "eks_cluster" { - source = "lablabs/eks-cluster/aws" - region = data.aws_region.current.name - subnet_ids = module.vpc.public_subnets - vpc_id = module.vpc.vpc_id - name = "alb-ingress" - - oidc_provider_enabled = true - - workers_security_group_ids = [module.eks_workers.security_group_id] - workers_role_arns = [module.eks_workers.workers_role_arn] -} - - -module "eks_workers" { - source = "lablabs/eks-workers/aws" - version = "0.11.0" - - cluster_certificate_authority_data = module.eks_cluster.eks_cluster_certificate_authority_data - cluster_endpoint = module.eks_cluster.eks_cluster_endpoint - cluster_name = module.eks_cluster.eks_cluster_id - cluster_security_group_id = module.eks_cluster.security_group_id - instance_type = "t3.medium" - max_size = 2 - min_size = 2 - subnet_ids = module.vpc.public_subnets - vpc_id = module.vpc.vpc_id - associate_public_ip_address = true - - eks_worker_ami_name_filter = "amazon-eks-node-${module.eks_cluster.eks_cluster_version}-*" -} - -# Use the module: - -module "alb_ingress" { - source = "../../" - - cluster_identity_oidc_issuer = module.eks_cluster.eks_cluster_identity_oidc_issuer - cluster_identity_oidc_issuer_arn = module.eks_cluster.eks_cluster_identity_oidc_issuer_arn - cluster_name = module.eks_cluster.eks_cluster_id - - enabled = true - - settings = { - "awsVpcID" : module.vpc.vpc_id - "awsRegion" : data.aws_region.current.name - } -} +// # TODO: make terraform 0.13 compatible +//data "aws_region" "current" {} +// +//module "vpc" { +// source = "terraform-aws-modules/vpc/aws" +// +// name = "alb-ingress-vpc" +// cidr = "10.0.0.0/16" +// azs = ["eu-central-1a", "eu-central-1b"] +// public_subnets = ["10.0.101.0/24", "10.0.102.0/24"] +// enable_nat_gateway = true +//} +// +//module "eks_cluster" { +// source = "lablabs/eks-cluster/aws" +// region = data.aws_region.current.name +// subnet_ids = module.vpc.public_subnets +// vpc_id = module.vpc.vpc_id +// name = "alb-ingress" +// +// oidc_provider_enabled = true +// +// workers_security_group_ids = [module.eks_workers.security_group_id] +// workers_role_arns = [module.eks_workers.workers_role_arn] +//} +// +// +//module "eks_workers" { +// source = "lablabs/eks-workers/aws" +// version = "0.11.0" +// +// cluster_certificate_authority_data = module.eks_cluster.eks_cluster_certificate_authority_data +// cluster_endpoint = module.eks_cluster.eks_cluster_endpoint +// cluster_name = module.eks_cluster.eks_cluster_id +// cluster_security_group_id = module.eks_cluster.security_group_id +// instance_type = "t3.medium" +// max_size = 2 +// min_size = 2 +// subnet_ids = module.vpc.public_subnets +// vpc_id = module.vpc.vpc_id +// associate_public_ip_address = true +// +// eks_worker_ami_name_filter = "amazon-eks-node-${module.eks_cluster.eks_cluster_version}-*" +//} +// +//# Use the module: +// +//module "alb_ingress" { +// source = "../../" +// +// cluster_identity_oidc_issuer = module.eks_cluster.eks_cluster_identity_oidc_issuer +// cluster_identity_oidc_issuer_arn = module.eks_cluster.eks_cluster_identity_oidc_issuer_arn +// cluster_name = module.eks_cluster.eks_cluster_id +// +// enabled = true +// +// settings = { +// "awsVpcID" : module.vpc.vpc_id +// "awsRegion" : data.aws_region.current.name +// } +//} //# The example application behind the Load balancer // diff --git a/examples/basic/outputs.tf b/examples/basic/outputs.tf.off similarity index 87% rename from examples/basic/outputs.tf rename to examples/basic/outputs.tf.off index 5dd5fe7..72f6e5d 100644 --- a/examples/basic/outputs.tf +++ b/examples/basic/outputs.tf.off @@ -1,3 +1,4 @@ +# TODO: make terraform 0.13 compatible // This output is commented intentionally. See commented resources in main.tf // file for more details. // diff --git a/examples/basic/providers.tf b/examples/basic/providers.tf deleted file mode 100644 index a30a001..0000000 --- a/examples/basic/providers.tf +++ /dev/null @@ -1,30 +0,0 @@ -provider "aws" { - version = "~> 2.0" - region = "eu-central-1" -} - -data "aws_eks_cluster" "this" { - name = module.eks_cluster.eks_cluster_id -} - -data "aws_eks_cluster_auth" "this" { - name = module.eks_cluster.eks_cluster_id -} - -provider "kubernetes" { - version = "~> 1.10" - host = data.aws_eks_cluster.this.endpoint - cluster_ca_certificate = base64decode(data.aws_eks_cluster.this.certificate_authority.0.data) - token = data.aws_eks_cluster_auth.this.token - load_config_file = false -} - -provider "helm" { - version = "~> 1.0" - kubernetes { - host = data.aws_eks_cluster.this.endpoint - cluster_ca_certificate = base64decode(data.aws_eks_cluster.this.certificate_authority.0.data) - token = data.aws_eks_cluster_auth.this.token - load_config_file = false - } -} diff --git a/examples/basic/providers.tf.off b/examples/basic/providers.tf.off new file mode 100644 index 0000000..20ec3bc --- /dev/null +++ b/examples/basic/providers.tf.off @@ -0,0 +1,31 @@ +// # TODO: make terraform 0.13 compatible +//provider "aws" { +// version = "~> 2.0" +// region = "eu-central-1" +//} +// +//data "aws_eks_cluster" "this" { +// name = module.eks_cluster.eks_cluster_id +//} +// +//data "aws_eks_cluster_auth" "this" { +// name = module.eks_cluster.eks_cluster_id +//} +// +//provider "kubernetes" { +// version = "~> 1.10" +// host = data.aws_eks_cluster.this.endpoint +// cluster_ca_certificate = base64decode(data.aws_eks_cluster.this.certificate_authority.0.data) +// token = data.aws_eks_cluster_auth.this.token +// load_config_file = false +//} +// +//provider "helm" { +// version = "~> 1.0" +// kubernetes { +// host = data.aws_eks_cluster.this.endpoint +// cluster_ca_certificate = base64decode(data.aws_eks_cluster.this.certificate_authority.0.data) +// token = data.aws_eks_cluster_auth.this.token +// load_config_file = false +// } +//}