Skip to content

Commit

Permalink
prepare terraform files for terrraform veriosn => 0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonskie authored and rkoster committed Mar 23, 2023
1 parent 53ffde1 commit d652ce4
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 33 deletions.
4 changes: 2 additions & 2 deletions terraform/aws/templates/base.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ resource "aws_security_group" "nat_security_group" {
}

lifecycle {
ignore_changes = ["name"]
ignore_changes = [name]
}
}

Expand Down Expand Up @@ -399,7 +399,7 @@ resource "aws_subnet" "internal_subnets" {
}

lifecycle {
ignore_changes = ["cidr_block", "availability_zone"]
ignore_changes = [cidr_block, availability_zone]
}
}

Expand Down
4 changes: 2 additions & 2 deletions terraform/aws/templates/iso_segments.tf
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ resource "aws_security_group_rule" "isolation_segments_to_bosh_all_traffic_rule"

description = "ALL traffic from iso-sg to bosh"

depends_on = ["aws_security_group.bosh_security_group"]
depends_on = [aws_security_group.bosh_security_group]
security_group_id = "${aws_security_group.bosh_security_group.id}"
type = "ingress"
protocol = "-1"
Expand All @@ -185,7 +185,7 @@ resource "aws_security_group_rule" "shared_diego_bbs_to_isolated_cells_rule" {

description = "TCP traffic from shared diego bbs to iso-sg"

depends_on = ["aws_security_group.iso_security_group"]
depends_on = [aws_security_group.iso_security_group]
security_group_id = "${aws_security_group.iso_security_group.id}"
type = "ingress"
protocol = "tcp"
Expand Down
4 changes: 0 additions & 4 deletions terraform/aws/templates/ssl_certificate.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ variable "ssl_certificate_chain" {
type = string
}

variable "ssl_certificate_chain" {
type = "string"
}

variable "ssl_certificate_private_key" {
type = string
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/azure/templates/cf_dns.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
data "azurerm_public_ip" "cf-lb" {
name = "${var.env_id}-cf-lb-ip"
resource_group_name = "${azurerm_resource_group.bosh.name}"
depends_on = ["azurerm_application_gateway.cf"]
depends_on = [azurerm_application_gateway.cf]
}

resource "azurerm_dns_zone" "cf" {
Expand Down
2 changes: 1 addition & 1 deletion terraform/azure/templates/storage.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ resource "azurerm_storage_account" "bosh" {
}

lifecycle {
ignore_changes = ["name"]
ignore_changes = [name]
}
}

Expand Down
25 changes: 16 additions & 9 deletions terraform/azure/templates/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,21 @@ provider "azurerm" {
tenant_id = "${var.tenant_id}"
client_id = "${var.client_id}"
client_secret = "${var.client_secret}"

version = "~> 1.22"
}

provider "tls" {
version = "~> 1.2"
}

provider "random" {
version = "~> 2.0"
}
terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = ">= 3.46.0"
}
random = {
source = "hashicorp/random"
version = ">= 3.4.3"
}
tls = {
source = "hashicorp/tls"
version = ">= 3.1"
}
}
}
14 changes: 7 additions & 7 deletions terraform/gcp/templates/cf_dns.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ output "system_domain_dns_servers" {

resource "google_dns_record_set" "wildcard-dns" {
name = "*.${google_dns_managed_zone.env_dns_zone.dns_name}"
depends_on = ["google_compute_global_address.cf-address"]
depends_on = [google_compute_global_address.cf-address]
type = "A"
ttl = 300

Expand All @@ -25,7 +25,7 @@ resource "google_dns_record_set" "wildcard-dns" {

resource "google_dns_record_set" "bosh-dns" {
name = "bosh.${google_dns_managed_zone.env_dns_zone.dns_name}"
depends_on = ["google_compute_address.jumpbox-ip"]
depends_on = [google_compute_address.jumpbox-ip]
type = "A"
ttl = 300

Expand All @@ -36,7 +36,7 @@ resource "google_dns_record_set" "bosh-dns" {

resource "google_dns_record_set" "cf-ssh-proxy" {
name = "ssh.${google_dns_managed_zone.env_dns_zone.dns_name}"
depends_on = ["google_compute_address.cf-ssh-proxy"]
depends_on = [google_compute_address.cf-ssh-proxy]
type = "A"
ttl = 300

Expand All @@ -47,7 +47,7 @@ resource "google_dns_record_set" "cf-ssh-proxy" {

resource "google_dns_record_set" "tcp-dns" {
name = "tcp.${google_dns_managed_zone.env_dns_zone.dns_name}"
depends_on = ["google_compute_address.cf-tcp-router"]
depends_on = [google_compute_address.cf-tcp-router]
type = "A"
ttl = 300

Expand All @@ -58,7 +58,7 @@ resource "google_dns_record_set" "tcp-dns" {

resource "google_dns_record_set" "doppler-dns" {
name = "doppler.${google_dns_managed_zone.env_dns_zone.dns_name}"
depends_on = ["google_compute_address.cf-ws"]
depends_on = [google_compute_address.cf-ws]
type = "A"
ttl = 300

Expand All @@ -69,7 +69,7 @@ resource "google_dns_record_set" "doppler-dns" {

resource "google_dns_record_set" "loggregator-dns" {
name = "loggregator.${google_dns_managed_zone.env_dns_zone.dns_name}"
depends_on = ["google_compute_address.cf-ws"]
depends_on = [google_compute_address.cf-ws]
type = "A"
ttl = 300

Expand All @@ -80,7 +80,7 @@ resource "google_dns_record_set" "loggregator-dns" {

resource "google_dns_record_set" "wildcard-ws-dns" {
name = "*.ws.${google_dns_managed_zone.env_dns_zone.dns_name}"
depends_on = ["google_compute_address.cf-ws"]
depends_on = [google_compute_address.cf-ws]
type = "A"
ttl = 300

Expand Down
8 changes: 4 additions & 4 deletions terraform/gcp/templates/cf_lb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ output "ws_lb_ip" {

resource "google_compute_firewall" "firewall-cf" {
name = "${var.env_id}-cf-open"
depends_on = ["google_compute_network.bbl-network"]
depends_on = [google_compute_network.bbl-network]
network = "${google_compute_network.bbl-network.name}"

allow {
Expand Down Expand Up @@ -106,7 +106,7 @@ resource "google_compute_http_health_check" "cf-public-health-check" {

resource "google_compute_firewall" "cf-health-check" {
name = "${var.env_id}-cf-health-check"
depends_on = ["google_compute_network.bbl-network"]
depends_on = [google_compute_network.bbl-network]
network = "${google_compute_network.bbl-network.name}"

allow {
Expand All @@ -128,7 +128,7 @@ resource "google_compute_address" "cf-ssh-proxy" {

resource "google_compute_firewall" "cf-ssh-proxy" {
name = "${var.env_id}-cf-ssh-proxy-open"
depends_on = ["google_compute_network.bbl-network"]
depends_on = [google_compute_network.bbl-network]
network = "${google_compute_network.bbl-network.name}"

allow {
Expand Down Expand Up @@ -161,7 +161,7 @@ output "tcp_router_target_pool" {

resource "google_compute_firewall" "cf-tcp-router" {
name = "${var.env_id}-cf-tcp-router"
depends_on = ["google_compute_network.bbl-network"]
depends_on = [google_compute_network.bbl-network]
network = "${google_compute_network.bbl-network.name}"

allow {
Expand Down
9 changes: 9 additions & 0 deletions terraform/gcp/templates/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,12 @@ provider "google" {
project = "${var.project_id}"
region = "${var.region}"
}

terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 4.56.0"
}
}
}
11 changes: 9 additions & 2 deletions terraform/openstack/templates/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ provider "openstack" {
domain_name = "${var.domain_name}"
insecure = "${var.insecure}"
cacert_file = "${var.cacert_file}"

version = "~> 1.16, < 1.44"
}

terraform {
required_providers {
openstack = {
source = "terraform-provider-openstack/openstack"
version = ">= 1.50.0"
}
}
}
2 changes: 1 addition & 1 deletion terraform/openstack/templates/resources-vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ variable "availability_zone" {
variable "dns_nameservers" {
description = "List of DNS server IPs"
default = ["8.8.8.8"]
type = "list"
type = list
}

variable "ext_net_name" {
Expand Down

0 comments on commit d652ce4

Please sign in to comment.