This commit is contained in:
parent
7dd930d465
commit
e8a89352e2
4 changed files with 23 additions and 23 deletions
2
minio.tf
2
minio.tf
|
@ -4,5 +4,5 @@ module "minio" {
|
||||||
network = docker_network.loadbalancer
|
network = docker_network.loadbalancer
|
||||||
storage_path = "/media/storage/minio"
|
storage_path = "/media/storage/minio"
|
||||||
admin_username = "techinc"
|
admin_username = "techinc"
|
||||||
expose_ports = true
|
expose_ports = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ variable "storage_path" {
|
||||||
description = "The path to the storage directory to use"
|
description = "The path to the storage directory to use"
|
||||||
}
|
}
|
||||||
variable "expose_ports" {
|
variable "expose_ports" {
|
||||||
type = bool
|
type = bool
|
||||||
description = "Expose the minio ports to the outside world"
|
description = "Expose the minio ports to the outside world"
|
||||||
default = false
|
default = false
|
||||||
}
|
}
|
|
@ -52,16 +52,16 @@ resource "docker_service" "minio" {
|
||||||
dynamic "endpoint_spec" {
|
dynamic "endpoint_spec" {
|
||||||
for_each = var.expose_ports ? toset(["aw yis"]) : toset([])
|
for_each = var.expose_ports ? toset(["aw yis"]) : toset([])
|
||||||
content {
|
content {
|
||||||
ports {
|
ports {
|
||||||
target_port = 9000
|
target_port = 9000
|
||||||
published_port = 9000
|
published_port = 9000
|
||||||
publish_mode = "ingress"
|
publish_mode = "ingress"
|
||||||
}
|
}
|
||||||
ports {
|
ports {
|
||||||
target_port = 9001
|
target_port = 9001
|
||||||
published_port = 9001
|
published_port = 9001
|
||||||
publish_mode = "ingress"
|
publish_mode = "ingress"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
18
terraform.tf
18
terraform.tf
|
@ -21,18 +21,18 @@ terraform {
|
||||||
}
|
}
|
||||||
|
|
||||||
backend "s3" {
|
backend "s3" {
|
||||||
bucket = "terraform"
|
bucket = "terraform"
|
||||||
key = "ti-iac.tfstate"
|
key = "ti-iac.tfstate"
|
||||||
profile = "techinc-tf"
|
profile = "techinc-tf"
|
||||||
shared_credentials_files = ["~/.aws/credentials"]
|
shared_credentials_files = ["~/.aws/credentials"]
|
||||||
endpoints = {
|
endpoints = {
|
||||||
s3 = "http://california.ti:9000"
|
s3 = "http://california.ti:9000"
|
||||||
}
|
}
|
||||||
region = "main" # Region validation will be skipped
|
region = "main" # Region validation will be skipped
|
||||||
skip_credentials_validation = true # Skip AWS related checks and validations
|
skip_credentials_validation = true # Skip AWS related checks and validations
|
||||||
skip_requesting_account_id = true
|
skip_requesting_account_id = true
|
||||||
skip_metadata_api_check = true
|
skip_metadata_api_check = true
|
||||||
skip_region_validation = true
|
skip_region_validation = true
|
||||||
use_path_style = true # Enable path-style S3 URLs (https://<HOST>/<BUCKET> https://developer.hashicorp.com/terraform/language/settings/backends/s3#use_path_style
|
use_path_style = true # Enable path-style S3 URLs (https://<HOST>/<BUCKET> https://developer.hashicorp.com/terraform/language/settings/backends/s3#use_path_style
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue