Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions terraform/modules/tcp-routing/routing.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
data "cloudfoundry_router_group" "tcp_router_group" {
name = "default-tcp"
name = "default-tcp"
}

resource "cloudfoundry_isolation_segment" "tcp" {
Expand All @@ -14,9 +14,9 @@ resource "cloudfoundry_isolation_segment_entitlement" "tcp" {
}

resource "cloudfoundry_domain" "tcp" {
for_each = toset(var.tcp_lb_dns_names)
sub_domain = "tcp-${index(var.tcp_lb_dns_names, each.key)}"
domain = var.domain_name
internal = false
for_each = toset(var.tcp_lb_dns_names)
sub_domain = "tcp-${index(var.tcp_lb_dns_names, each.key)}"
domain = var.domain_name
internal = false
router_group = data.cloudfoundry_router_group.tcp_router_group.id
}
2 changes: 1 addition & 1 deletion terraform/modules/tcp-routing/variables.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variable "cloud_gov_org_id" {

}

variable "tcp_lb_dns_names" {
Expand Down
28 changes: 14 additions & 14 deletions terraform/modules/test_cdn/test_cdn.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,24 +62,24 @@ resource "cloudfoundry_service_instance" "test_cdn_instance" {
}

resource "cloudfoundry_app" "test-cdn" {
name = "test-cdn"
buildpacks = ["staticfile_buildpack"]
org_name = data.cloudfoundry_org.org.name
space_name = data.cloudfoundry_space.hello_worlds.name
path = local.zip_output_filepath
source_code_hash = data.archive_file.test_cdn_app_src.output_sha256
memory = "512M"
disk_quota = "1024M"
enable_ssh = true
health_check_type = "port"
instances = 1
log_rate_limit_per_second = "-1"
name = "test-cdn"
buildpacks = ["staticfile_buildpack"]
org_name = data.cloudfoundry_org.org.name
space_name = data.cloudfoundry_space.hello_worlds.name
path = local.zip_output_filepath
source_code_hash = data.archive_file.test_cdn_app_src.output_sha256
memory = "512M"
disk_quota = "1024M"
enable_ssh = true
health_check_type = "port"
instances = 1
log_rate_limit_per_second = "-1"
readiness_health_check_type = "process"
stack = "cflinuxfs4"
stack = "cflinuxfs4"


routes = [{
protocol = "http1"
route = cloudfoundry_route.test_cdn_route.url
route = cloudfoundry_route.test_cdn_route.url
}]
}
22 changes: 11 additions & 11 deletions terraform/modules/test_cdn/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@ variable "iaas_stack_name" {
}

variable "organization_name" {
type = string
type = string
description = "Organization name to use for test CDN app"
}

variable "space_name" {
type = string
type = string
description = "Space name to use for test CDN app"
default = "hello-worlds"
default = "hello-worlds"
}

variable "source_code_repo" {
type = string
type = string
description = "HTTPS link to git repo containing source code for test CDN app"
default = "https://github.com/cloud-gov/cf-hello-worlds.git"
default = "https://github.com/cloud-gov/cf-hello-worlds.git"
}

variable "source_code_path" {
type = string
type = string
description = "Path in source_code_repo containing app code"
default = "static"
default = "static"
}

variable "git_clone_dir" {
type = string
type = string
description = "Subdirectory of module path to clone git repo"
default = "cf-hello-worlds"
default = "cf-hello-worlds"
}

variable "zip_output_filename" {
type = string
type = string
description = "Name of zip file containing source code for test CDN app"
default = "hello-world-static.zip"
default = "hello-world-static.zip"
}
6 changes: 3 additions & 3 deletions terraform/stacks/cf/apps.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "test_cdn" {
count = var.iaas_stack_name == "development" ? 0 : 1
source = "../../modules/test_cdn"
iaas_stack_name = var.iaas_stack_name
count = var.iaas_stack_name == "development" ? 0 : 1
source = "../../modules/test_cdn"
iaas_stack_name = var.iaas_stack_name
organization_name = cloudfoundry_org.cloud-gov.name
}
24 changes: 24 additions & 0 deletions terraform/stacks/cf/services.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Get organization
resource "cloudfoundry_org" "opensearch_smoke_test_org" {
name = "opensearch_smoke_test_org"
}

# Get space
resource "cloudfoundry_space" "opensearch_smoke_test_space" {
name = "opensearch_smoke_tests_space"
org = cloudfoundry_org.opensearch_smoke_test_org.id
}

# Get service plan
data "cloudfoundry_service_plan" "rds_plan" {
name = "micro-psql"
service_offering_name = "aws-rds"
}

# Create RDS service instance
resource "cloudfoundry_service_instance" "rds_instance" {
name = "opensearch-test-db"
space = cloudfoundry_space.opensearch_smoke_test_space.id
service_plan = data.cloudfoundry_service_plan.rds_plan.id
type = "managed"
}