From 80f31818df337294eb8e3ddec589d4074a74c20a Mon Sep 17 00:00:00 2001 From: Maxime Guyot Date: Wed, 10 Apr 2019 11:14:14 +0200 Subject: [PATCH] Add terraform validate for contrib/terraform/aws (#4438) --- .gitlab-ci.yml | 7 +++ .../terraform/aws/sample-inventory/cluster.tf | 45 +++++++++++++++++++ .../terraform/aws/sample-inventory/group_vars | 1 + 3 files changed, 53 insertions(+) create mode 100644 contrib/terraform/aws/sample-inventory/cluster.tf create mode 120000 contrib/terraform/aws/sample-inventory/group_vars diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b12b04ebc..cdd7dbba8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -814,6 +814,13 @@ tf-validate-packet: PROVIDER: packet CLUSTER: $CI_COMMIT_REF_NAME +tf-validate-aws: + <<: *terraform_validate + variables: + TF_VERSION: 0.11.11 + PROVIDER: aws + CLUSTER: $CI_COMMIT_REF_NAME + tf-apply-packet: <<: *terraform_apply variables: diff --git a/contrib/terraform/aws/sample-inventory/cluster.tf b/contrib/terraform/aws/sample-inventory/cluster.tf new file mode 100644 index 000000000..13f83c4cf --- /dev/null +++ b/contrib/terraform/aws/sample-inventory/cluster.tf @@ -0,0 +1,45 @@ +#Global Vars +aws_cluster_name = "devtest" + +#VPC Vars +aws_vpc_cidr_block = "10.250.192.0/18" +aws_cidr_subnets_private = ["10.250.192.0/20","10.250.208.0/20"] +aws_cidr_subnets_public = ["10.250.224.0/20","10.250.240.0/20"] + +#Bastion Host +aws_bastion_size = "t2.medium" + + +#Kubernetes Cluster + +aws_kube_master_num = 3 +aws_kube_master_size = "t2.medium" + +aws_etcd_num = 3 +aws_etcd_size = "t2.medium" + +aws_kube_worker_num = 4 +aws_kube_worker_size = "t2.medium" + +#Settings AWS ELB + +aws_elb_api_port = 6443 +k8s_secure_api_port = 6443 +kube_insecure_apiserver_address = "0.0.0.0" + +default_tags = { +# Env = "devtest" +# Product = "kubernetes" +} + +inventory_file = "../../../inventory/hosts" + +## Credentials +#AWS Access Key +AWS_ACCESS_KEY_ID = "" +#AWS Secret Key +AWS_SECRET_ACCESS_KEY = "" +#EC2 SSH Key Name +AWS_SSH_KEY_NAME = "" +#AWS Region +AWS_DEFAULT_REGION = "eu-central-1" diff --git a/contrib/terraform/aws/sample-inventory/group_vars b/contrib/terraform/aws/sample-inventory/group_vars new file mode 120000 index 000000000..373595823 --- /dev/null +++ b/contrib/terraform/aws/sample-inventory/group_vars @@ -0,0 +1 @@ +../../../../inventory/sample/group_vars \ No newline at end of file