Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
terraform_module
/
scrm_standard_template
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 5f6e5a92
authored
Jan 19, 2024
by
chenxx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update 6
1 parent
94414503
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
main.tf
variables.tf
main.tf
View file @
5f6e5a9
...
@@ -51,7 +51,15 @@ module "deployment" {
...
@@ -51,7 +51,15 @@ module "deployment" {
]
]
#domian map
#domian map
host_aliases = var.hosts
host_aliases = [
for host_list in var.hosts : [
for h in host_list.hostname :
{
hostname = h,
ip = ip
}
]
]
}
}
...
@@ -87,7 +95,9 @@ module "ingress" {
...
@@ -87,7 +95,9 @@ module "ingress" {
rule = [
rule = [
{
{
domain = var.ingress_switch.domain_name
domain = var.ingress_switch.domain_name
external_port = var.ports[0] // Service port
external_port = var.ports[
0
] // Service port
path = var.ingress_switch.path
path = var.ingress_switch.path
path_type = var.ingress_switch.path_type
path_type = var.ingress_switch.path_type
}
}
...
...
variables.tf
View file @
5f6e5a9
...
@@ -145,6 +145,6 @@ variable "ingress_switch" {
...
@@ -145,6 +145,6 @@ variable "ingress_switch" {
# @group "Advanced"
# @group "Advanced"
variable "hosts" {
variable "hosts" {
type = list(object({ hostname = list(string), ip = string }))
type = list(object({ hostname = list(string), ip = string }))
description = "(Optional)
Add /etc/hosts records to pod
s"
description = "(Optional)
host aliases 手动配置域名到host
s"
default = []
default = []
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment