mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-03-30 14:11:58 +02:00
giving a subnet to the mock command for validation in CI
This commit is contained in:
@@ -26,7 +26,7 @@ script:
|
|||||||
- echo 'script'
|
- echo 'script'
|
||||||
- terraform init
|
- terraform init
|
||||||
- terraform fmt -check=true
|
- terraform fmt -check=true
|
||||||
- terraform validate -var "region=${AWS_REGION}" -var "vpc_id=vpc-123456" -var "subnets=[]" -var "workers_ami_id=ami-123456" -var "cluster_ingress_cidrs=[]" -var "cluster_name=test_cluster"
|
- 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"
|
||||||
- docker run --rm -v $(pwd):/app/ --workdir=/app/ -t wata727/tflint --error-with-issues
|
- docker run --rm -v $(pwd):/app/ --workdir=/app/ -t wata727/tflint --error-with-issues
|
||||||
- cd examples/eks_test_fixture
|
- cd examples/eks_test_fixture
|
||||||
- terraform init
|
- terraform init
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ provider "random" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
provider "http" {}
|
provider "http" {}
|
||||||
|
provider "local" {}
|
||||||
|
|
||||||
data "aws_ami" "eks_worker" {
|
data "aws_ami" "eks_worker" {
|
||||||
filter {
|
filter {
|
||||||
@@ -68,14 +69,6 @@ module "vpc" {
|
|||||||
tags = "${merge(local.tags, map("kubernetes.io/cluster/${local.cluster_name}", "shared"))}"
|
tags = "${merge(local.tags, map("kubernetes.io/cluster/${local.cluster_name}", "shared"))}"
|
||||||
}
|
}
|
||||||
|
|
||||||
module "security_group" {
|
|
||||||
source = "terraform-aws-modules/security-group/aws"
|
|
||||||
version = "1.12.0"
|
|
||||||
name = "test-sg-https"
|
|
||||||
vpc_id = "${module.vpc.vpc_id}"
|
|
||||||
tags = "${local.tags}"
|
|
||||||
}
|
|
||||||
|
|
||||||
module "eks" {
|
module "eks" {
|
||||||
source = "../.."
|
source = "../.."
|
||||||
cluster_name = "${local.cluster_name}"
|
cluster_name = "${local.cluster_name}"
|
||||||
|
|||||||
Reference in New Issue
Block a user