Skip to content

Commit

Permalink
Format all manifests
Browse files Browse the repository at this point in the history
Run "terraform fmt" over all "*.tf" files.
  • Loading branch information
ozerovandrei committed Feb 17, 2019
1 parent 006af35 commit a00bda9
Show file tree
Hide file tree
Showing 24 changed files with 70 additions and 63 deletions.
20 changes: 10 additions & 10 deletions examples/vpc/kubernetes_cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ module "kubernetes_cluster" {
os_region = "${var.os_region}"

# Kubernetes cluster common parameters.
cluster_name = "${var.cluster_name}"
cluster_zone = "${var.cluster_zone}"
cluster_kube_version = "${var.cluster_kube_version}"
cluster_ssh_key = "${file("~/.ssh/id_rsa.pub")}"
cluster_ssh_key_user = "${module.project_with_user.user_id}"
cluster_master_lb_enabled = "${var.cluster_master_lb_enabled}"
cluster_master_floating_ip = "${var.cluster_master_floating_ip}"
cluster_docker_volume_size = "${var.cluster_docker_volume_size}"
cluster_etcd_volume_size = "${var.cluster_etcd_volume_size}"
cluster_name = "${var.cluster_name}"
cluster_zone = "${var.cluster_zone}"
cluster_kube_version = "${var.cluster_kube_version}"
cluster_ssh_key = "${file("~/.ssh/id_rsa.pub")}"
cluster_ssh_key_user = "${module.project_with_user.user_id}"
cluster_master_lb_enabled = "${var.cluster_master_lb_enabled}"
cluster_master_floating_ip = "${var.cluster_master_floating_ip}"
cluster_docker_volume_size = "${var.cluster_docker_volume_size}"
cluster_etcd_volume_size = "${var.cluster_etcd_volume_size}"

# Kubernetes cluster masters parameters.
cluster_master_count = "${var.cluster_master_count}"
Expand All @@ -45,4 +45,4 @@ module "kubernetes_cluster" {
cluster_node_count = "${var.cluster_node_count}"
cluster_node_vcpus = "${var.cluster_node_vcpus}"
cluster_node_ram = "${var.cluster_node_ram}"
}
}
2 changes: 1 addition & 1 deletion examples/vpc/kubernetes_cluster/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ variable "cluster_etcd_volume_size" {

variable "cluster_master_floating_ip" {
default = "True"
}
}
4 changes: 2 additions & 2 deletions examples/vpc/server_local_and_remote_disks/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Initialize Selectel provider with token.
provider "selectel" {
token = "${var.sel_token}"
token = "${var.sel_token}"
}

# Create the main project with user.
Expand Down Expand Up @@ -37,4 +37,4 @@ module "server_local_and_remote_disks" {
server_image_name = "${var.server_image_name}"
server_ssh_key = "${file("~/.ssh/id_rsa.pub")}"
server_ssh_key_user = "${module.project_with_user.user_id}"
}
}
4 changes: 2 additions & 2 deletions examples/vpc/server_local_root_disk/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Initialize Selectel provider with token.
provider "selectel" {
token = "${var.sel_token}"
token = "${var.sel_token}"
}

# Create the main project with user.
Expand Down Expand Up @@ -35,4 +35,4 @@ module "server_local_root_disk" {
server_image_name = "${var.server_image_name}"
server_ssh_key = "${file("~/.ssh/id_rsa.pub")}"
server_ssh_key_user = "${module.project_with_user.user_id}"
}
}
2 changes: 1 addition & 1 deletion examples/vpc/server_remote_root_disk/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ module "server_remote_root_disk" {
server_image_name = "${var.server_image_name}"
server_ssh_key = "${file("~/.ssh/id_rsa.pub")}"
server_ssh_key_user = "${module.project_with_user.user_id}"
}
}
2 changes: 1 addition & 1 deletion examples/vpc/server_remote_root_disk/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ variable "user_name" {}
variable "user_password" {}

variable "keypair_name" {
default= "tf_keypair"
default = "tf_keypair"
}

variable "os_auth_url" {
Expand Down
2 changes: 1 addition & 1 deletion examples/vpc/server_remote_root_disk_two_ports/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ module "server_remote_root_disk_two_ports" {
server_image_name = "${var.server_image_name}"
server_ssh_key = "${file("~/.ssh/id_rsa.pub")}"
server_ssh_key_user = "${module.project_with_user.user_id}"
}
}
2 changes: 1 addition & 1 deletion modules/vpc/keypair/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ output "keypair_id" {

output "keypair_name" {
value = "${selectel_vpc_keypair_v2.keypair_1.name}"
}
}
17 changes: 9 additions & 8 deletions modules/vpc/kubernetes_cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ resource "random_string" "random_name" {
}

module "master_flavor" {
source = "../flavor"
flavor_name = "flavor-master-${random_string.random_name.result}"
flavor_vcpus = "${var.cluster_master_vcpus}"
flavor_ram_mb = "${var.cluster_master_ram}"
source = "../flavor"
flavor_name = "flavor-master-${random_string.random_name.result}"
flavor_vcpus = "${var.cluster_master_vcpus}"
flavor_ram_mb = "${var.cluster_master_ram}"
}

module "flavor" {
source = "../flavor"
flavor_name = "flavor-${random_string.random_name.result}"
flavor_vcpus = "${var.cluster_node_vcpus}"
flavor_ram_mb = "${var.cluster_node_ram}"
source = "../flavor"
flavor_name = "flavor-${random_string.random_name.result}"
flavor_vcpus = "${var.cluster_node_vcpus}"
flavor_ram_mb = "${var.cluster_node_ram}"
}

module "image_datasource" {
Expand Down Expand Up @@ -58,6 +58,7 @@ resource "openstack_containerinfra_clustertemplate_v1" "clustertemplate_1" {
master_lb_enabled = "${var.cluster_master_lb_enabled}"
floating_ip_enabled = false
external_network_id = "${data.openstack_networking_network_v2.external_net.id}"

labels = {
kube_tag = "${var.cluster_kube_version}"
kube_dashboard_enabled = "${var.cluster_kube_dashboard_enabled}"
Expand Down
2 changes: 1 addition & 1 deletion modules/vpc/kubernetes_cluster/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ variable cluster_etcd_volume_size {

variable cluster_master_floating_ip {
default = "false"
}
}
6 changes: 3 additions & 3 deletions modules/vpc/nat/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ resource "openstack_networking_network_v2" "network_1" {

resource "openstack_networking_subnet_v2" "subnet_1" {
network_id = "${openstack_networking_network_v2.network_1.id}"
name = "${var.subnet_cidr}"
cidr = "${var.subnet_cidr}"
name = "${var.subnet_cidr}"
cidr = "${var.subnet_cidr}"
}

resource "openstack_networking_router_interface_v2" "router_interface_1" {
router_id = "${openstack_networking_router_v2.router_1.id}"
subnet_id = "${openstack_networking_subnet_v2.subnet_1.id}"
}
}
2 changes: 1 addition & 1 deletion modules/vpc/nat/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ output "network_id" {

output "subnet_id" {
value = "${openstack_networking_subnet_v2.subnet_1.id}"
}
}
2 changes: 1 addition & 1 deletion modules/vpc/nat/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ variable "network_name" {

variable "subnet_cidr" {
default = "192.168.0.0/24"
}
}
2 changes: 1 addition & 1 deletion modules/vpc/project_with_user/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ module "role" {
source = "../role"
role_project_id = "${module.project.project_id}"
role_user_id = "${module.user.user_id}"
}
}
4 changes: 2 additions & 2 deletions modules/vpc/project_with_user/vars.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
variable "project_name" {
default = "tf_project"
default = "tf_project"
}

variable "user_name" {
default = "tf_user"
default = "tf_user"
}

variable "user_password" {}
8 changes: 5 additions & 3 deletions modules/vpc/server_local_and_remote_disks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ module "flavor" {
flavor_vcpus = "${var.server_vcpus}"
flavor_ram_mb = "${var.server_ram_mb}"
flavor_local_disk_gb = "${var.server_root_disk_gb}"

lifecycle {
create_before_destroy = false
}
Expand All @@ -29,8 +30,9 @@ module "nat" {
}

resource "openstack_networking_port_v2" "port_1" {
name = "${var.server_name}-eth0"
network_id = "${module.nat.network_id}"
name = "${var.server_name}-eth0"
network_id = "${module.nat.network_id}"

fixed_ip {
subnet_id = "${module.nat.subnet_id}"
}
Expand Down Expand Up @@ -97,4 +99,4 @@ module "floatingip" {
resource "openstack_networking_floatingip_associate_v2" "association_1" {
port_id = "${openstack_networking_port_v2.port_1.id}"
floating_ip = "${module.floatingip.floatingip_address}"
}
}
2 changes: 1 addition & 1 deletion modules/vpc/server_local_and_remote_disks/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ variable "server_zone" {

variable "server_ssh_key" {}

variable "server_ssh_key_user" {}
variable "server_ssh_key_user" {}
5 changes: 3 additions & 2 deletions modules/vpc/server_local_root_disk/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ module "nat" {
}

resource "openstack_networking_port_v2" "port_1" {
name = "${var.server_name}-eth0"
network_id = "${module.nat.network_id}"
name = "${var.server_name}-eth0"
network_id = "${module.nat.network_id}"

fixed_ip {
subnet_id = "${module.nat.subnet_id}"
}
Expand Down
2 changes: 1 addition & 1 deletion modules/vpc/server_local_root_disk/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ variable "server_zone" {

variable "server_ssh_key" {}

variable "server_ssh_key_user" {}
variable "server_ssh_key_user" {}
15 changes: 8 additions & 7 deletions modules/vpc/server_remote_root_disk/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,20 @@ resource "random_string" "random_name" {
}

module "flavor" {
source = "../flavor"
flavor_name = "flavor-${random_string.random_name.result}"
flavor_vcpus = "${var.server_vcpus}"
flavor_ram_mb = "${var.server_ram_mb}"
source = "../flavor"
flavor_name = "flavor-${random_string.random_name.result}"
flavor_vcpus = "${var.server_vcpus}"
flavor_ram_mb = "${var.server_ram_mb}"
}

module "nat" {
source = "../nat"
}

resource "openstack_networking_port_v2" "port_1" {
name = "${var.server_name}-eth0"
network_id = "${module.nat.network_id}"
name = "${var.server_name}-eth0"
network_id = "${module.nat.network_id}"

fixed_ip {
subnet_id = "${module.nat.subnet_id}"
}
Expand Down Expand Up @@ -85,4 +86,4 @@ module "floatingip" {
resource "openstack_networking_floatingip_associate_v2" "association_1" {
port_id = "${openstack_networking_port_v2.port_1.id}"
floating_ip = "${module.floatingip.floatingip_address}"
}
}
2 changes: 1 addition & 1 deletion modules/vpc/server_remote_root_disk/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ variable "server_zone" {

variable "server_ssh_key" {}

variable "server_ssh_key_user" {}
variable "server_ssh_key_user" {}
20 changes: 11 additions & 9 deletions modules/vpc/server_remote_root_disk_two_ports/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ resource "random_string" "random_name" {
}

module "flavor" {
source = "../flavor"
flavor_name = "flavor-${random_string.random_name.result}"
flavor_vcpus = "${var.server_vcpus}"
flavor_ram_mb = "${var.server_ram_mb}"
source = "../flavor"
flavor_name = "flavor-${random_string.random_name.result}"
flavor_vcpus = "${var.server_vcpus}"
flavor_ram_mb = "${var.server_ram_mb}"
}

module "nat" {
Expand All @@ -32,16 +32,18 @@ resource "openstack_networking_subnet_v2" "subnet_2" {
}

resource "openstack_networking_port_v2" "port_1" {
name = "${var.server_name}-eth0"
network_id = "${module.nat.network_id}"
name = "${var.server_name}-eth0"
network_id = "${module.nat.network_id}"

fixed_ip {
subnet_id = "${module.nat.subnet_id}"
}
}

resource "openstack_networking_port_v2" "port_2" {
name = "${var.server_name}-eth1"
network_id = "${module.nat.network_id}"
name = "${var.server_name}-eth1"
network_id = "${module.nat.network_id}"

fixed_ip {
subnet_id = "${openstack_networking_subnet_v2.subnet_2.id}"
}
Expand Down Expand Up @@ -108,4 +110,4 @@ module "floatingip" {
resource "openstack_networking_floatingip_associate_v2" "association_1" {
port_id = "${openstack_networking_port_v2.port_1.id}"
floating_ip = "${module.floatingip.floatingip_address}"
}
}
2 changes: 1 addition & 1 deletion modules/vpc/server_remote_root_disk_two_ports/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ variable "server_zone" {

variable "server_ssh_key" {}

variable "server_ssh_key_user" {}
variable "server_ssh_key_user" {}
4 changes: 2 additions & 2 deletions modules/vpc/subnet/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ variable "subnet_project_id" {}
variable "subnet_region" {}

variable "subnet_prefix_length" {
default = 29
default = 29
}

variable "subnet_ip_version" {
default = "ipv4"
default = "ipv4"
}

0 comments on commit a00bda9

Please sign in to comment.