Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
*: terraform fmt entire module
Browse files Browse the repository at this point in the history
Fixes #93, removing the need for selective commiting and ensuring the
codebase can be verified at the registry.
  • Loading branch information
kerscher committed Apr 23, 2018
1 parent 911e68f commit 0f929be
Show file tree
Hide file tree
Showing 43 changed files with 929 additions and 747 deletions.
28 changes: 14 additions & 14 deletions examples/gitlab-asg/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,32 +64,32 @@ data "aws_availability_zones" "available" {}
module "ubuntu-xenial-ami" {
source = "../../modules/ami-ubuntu"
release = "16.04"
}
}

resource "aws_key_pair" "main" {
key_name = "${var.name}"
public_key = "${file(var.ssh_pubkey)}"
}

resource "aws_elb" "gitlab" {
name = "${var.name}"
subnets = ["${module.vpc.public_subnet_ids[0]}"]
security_groups = ["${aws_security_group.gitlab-elb.id}"]
name = "${var.name}"
subnets = ["${module.vpc.public_subnet_ids[0]}"]
security_groups = ["${aws_security_group.gitlab-elb.id}"]

listener {
instance_port = 8022
instance_protocol = "tcp"
lb_port = 22
lb_protocol = "tcp"
ssl_certificate_id = "${var.ssl_arn}"
instance_port = 8022
instance_protocol = "tcp"
lb_port = 22
lb_protocol = "tcp"
ssl_certificate_id = "${var.ssl_arn}"
}

listener {
instance_port = 80
instance_protocol = "http"
lb_port = 443
lb_protocol = "https"
ssl_certificate_id = "${var.ssl_arn}"
instance_port = 80
instance_protocol = "http"
lb_port = 443
lb_protocol = "https"
ssl_certificate_id = "${var.ssl_arn}"
}

health_check {
Expand Down
6 changes: 4 additions & 2 deletions examples/kube-stack-public/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ variable "vpc_cidr" {

variable "public_subnet_cidrs" {
description = "list of CIDR ranges for the public subnets"
default = ["10.10.10.0/24", "10.10.11.0/24"] #, "10.120.12.0/24"]
default = ["10.10.10.0/24", "10.10.11.0/24"] #, "10.120.12.0/24"]
}

variable "private_subnet_cidrs" {
description = "list of CIDR ranges for the private subnets"
default = ["10.10.20.0/24", "10.10.21.0/24"] #, "10.120.22.0/24"]
default = ["10.10.20.0/24", "10.10.21.0/24"] #, "10.120.22.0/24"]
}

variable "extra_tags" {
Expand All @@ -63,11 +63,13 @@ variable "extra_tags" {
variable "canonical_account_id" {
description = "AWS account it for Canonical, used to lookup Ubuntu AMIs"
default = "099720109477"

# for GovCloud, change to "513442679011"
}

variable "coreos_account_id" {
description = "AWS account it for CoreOS, used to lookup CoreOS AMIs"
default = "595879546273"

# for GovCloud, change to "190570271432"
}
46 changes: 24 additions & 22 deletions examples/legacy/elasticache.tf
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
resource "aws_security_group" "redis-inbound" {
name = "${var.name}-queue-redis-inbound"
vpc_id = "${module.test-vpc.id}"
ingress {
from_port = 6379
to_port = 6379
protocol = "tcp"
cidr_blocks = [ "${var.cidr_minions_a}", "${var.cidr_minions_c}"]
}
tags {
Description = "Allow redis-client from workers cluster"
}
name = "${var.name}-queue-redis-inbound"
vpc_id = "${module.test-vpc.id}"

ingress {
from_port = 6379
to_port = 6379
protocol = "tcp"
cidr_blocks = ["${var.cidr_minions_a}", "${var.cidr_minions_c}"]
}

tags {
Description = "Allow redis-client from workers cluster"
}
}

module "my-ec-cluster" {
source = "../modules/elasticache-redis-cluster"
name = "${var.name}"
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "${var.region}"
cidr_a = "${var.cidr_redis_a}"
cidr_c = "${var.cidr_redis_c}"
vpc_id = "${module.test-vpc.id}"
route_table_id = "${module.test-vpc.route_table_id}"
inbound_security_group = "${aws_security_group.redis-inbound.id}"
instance_type = "cache.m3.medium"
source = "../modules/elasticache-redis-cluster"
name = "${var.name}"
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "${var.region}"
cidr_a = "${var.cidr_redis_a}"
cidr_c = "${var.cidr_redis_c}"
vpc_id = "${module.test-vpc.id}"
route_table_id = "${module.test-vpc.route_table_id}"
inbound_security_group = "${aws_security_group.redis-inbound.id}"
instance_type = "cache.m3.medium"
}
Loading

0 comments on commit 0f929be

Please sign in to comment.