From c0ae644204f237d8f7c6e97b1a5789ca9f418ed7 Mon Sep 17 00:00:00 2001 From: Daniel Piddock <33028589+dpiddockcmp@users.noreply.github.com> Date: Mon, 4 Nov 2019 16:18:19 +0100 Subject: [PATCH 1/2] Add Action check against minimum versions (#575) --- .github/workflows/lint.yml | 20 ++++++++++++++++++-- CHANGELOG.md | 2 +- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 53cac00a..a9eedc8a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@master - name: TFLint uses: docker://wata727/tflint - + fmt: name: Code Format runs-on: ubuntu-latest @@ -18,7 +18,7 @@ jobs: steps: - uses: actions/checkout@master - run: terraform fmt --recursive -check=true - + docs: name: Docs runs-on: macOS-latest @@ -51,3 +51,19 @@ jobs: terraform validate cd - done + + minimum: + name: Minimum version check + runs-on: ubuntu-latest + container: + image: hashicorp/terraform:0.12.2 + steps: + - uses: actions/checkout@master + - name: Validate Code + env: + AWS_REGION: 'us-east-1' + TF_WARN_OUTPUT_ERRORS: 1 + run: | + sed -i -e 's/>=/=/' -e 's/ \(\d\+\.\d\+\)"/ \1.0"/' versions.tf + terraform init + terraform validate -var "region=${AWS_REGION}" -var "vpc_id=vpc-123456" -var "subnets=[\"subnet-12345a\"]" -var "workers_ami_id=ami-123456" -var "cluster_ingress_cidrs=[]" -var "cluster_name=test_cluster" diff --git a/CHANGELOG.md b/CHANGELOG.md index b3901b9c..d025b06c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ project adheres to [Semantic Versioning](http://semver.org/). ### Added -- Write your awesome addition here (by @you) +- Test against minimum versions specified in `versions.tf` (by @dpiddockcmp) ### Changed From a43e44f16490fa904922d405bd5a303dc84fc104 Mon Sep 17 00:00:00 2001 From: Ankit Wal Date: Thu, 7 Nov 2019 00:27:56 +0800 Subject: [PATCH 2/2] Update worker_iam_instance_profile outputs for launch template use (#583) * Add launch template instance profiles to output Concat launch template and asg instance profile lists Signed-off-by: Ankit Wal * Update ChangeLog Added changes made to output in Changelog Signed-off-by: Ankit Wal --- CHANGELOG.md | 2 +- outputs.tf | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d025b06c..057ff39d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ project adheres to [Semantic Versioning](http://semver.org/). ### Changed -- Write your awesome change here (by @you) +- Updated instance_profile_names and instance_profile_arns outputs to also consider launch template as well as asg (by @ankitwal) # History diff --git a/outputs.tf b/outputs.tf index a195b21f..d8755039 100644 --- a/outputs.tf +++ b/outputs.tf @@ -114,12 +114,18 @@ output "worker_security_group_id" { output "worker_iam_instance_profile_arns" { description = "default IAM instance profile ARN for EKS worker groups" - value = aws_iam_instance_profile.workers.*.arn + value = concat( + aws_iam_instance_profile.workers.*.arn, + aws_iam_instance_profile.workers_launch_template.*.arn + ) } output "worker_iam_instance_profile_names" { description = "default IAM instance profile name for EKS worker groups" - value = aws_iam_instance_profile.workers.*.name + value = concat( + aws_iam_instance_profile.workers.*.name, + aws_iam_instance_profile.workers_launch_template.*.name + ) } output "worker_iam_role_name" {