Skip to content

Commit 6938ea9

Browse files
shanewxythxCode
authored andcommitted
fix: default infrastructure
1 parent 0fcd1cc commit 6938ea9

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ Please read our [contributing guide](./docs/CONTRIBUTING.md) if you're intereste
4848

4949
| Name | Source | Version |
5050
|------|--------|---------|
51-
| <a name="module_master"></a> [master](#module\_master) | github.com/walrus-catalog/terraform-docker-containerservice | v0.1.0&depth=1 |
52-
| <a name="module_slave"></a> [slave](#module\_slave) | github.com/walrus-catalog/terraform-docker-containerservice | v0.1.0&depth=1 |
51+
| <a name="module_master"></a> [master](#module\_master) | github.com/walrus-catalog/terraform-docker-containerservice | v0.2.1&depth=1 |
52+
| <a name="module_slave"></a> [slave](#module\_slave) | github.com/walrus-catalog/terraform-docker-containerservice | v0.2.1&depth=1 |
5353

5454
## Resources
5555

@@ -65,7 +65,7 @@ Please read our [contributing guide](./docs/CONTRIBUTING.md) if you're intereste
6565
| <a name="input_context"></a> [context](#input\_context) | Receive contextual information. When Walrus deploys, Walrus will inject specific contextual information into this field.<br><br>Examples:<pre>context:<br> project:<br> name: string<br> id: string<br> environment:<br> name: string<br> id: string<br> resource:<br> name: string<br> id: string</pre> | `map(any)` | `{}` | no |
6666
| <a name="input_database"></a> [database](#input\_database) | Specify the database name. The database name must be 2-64 characters long and start with any lower letter, combined with number, or symbols: - \_. <br>The database name cannot be MySQL forbidden keyword. | `string` | `"mydb"` | no |
6767
| <a name="input_engine_version"></a> [engine\_version](#input\_engine\_version) | Specify the deployment engine version. | `string` | `"8.0"` | no |
68-
| <a name="input_infrastructure"></a> [infrastructure](#input\_infrastructure) | Specify the infrastructure information for deploying.<br><br>Examples:<pre>infrastructure:<br> network_id: string, optional<br> domain_suffix: string, optional</pre> | <pre>object({<br> network_id = optional(string, "local-walrus")<br> domain_suffix = optional(string, "cluster.local")<br> })</pre> | n/a | yes |
68+
| <a name="input_infrastructure"></a> [infrastructure](#input\_infrastructure) | Specify the infrastructure information for deploying.<br><br>Examples:<pre>infrastructure:<br> network_id: string, optional<br> domain_suffix: string, optional</pre> | <pre>object({<br> network_id = optional(string, "local-walrus")<br> domain_suffix = optional(string, "cluster.local")<br> })</pre> | <pre>{<br> "domain_suffix": "cluster.local",<br> "network_id": "local-walrus"<br>}</pre> | no |
6969
| <a name="input_password"></a> [password](#input\_password) | Specify the account password. The password must be 8-32 characters long and start with any letter, number, or symbols: ! # $ % ^ & * ( ) \_ + - =.<br>If not specified, it will use the first 16 characters of the username md5 hash value. | `string` | `null` | no |
7070
| <a name="input_replication_readonly_replicas"></a> [replication\_readonly\_replicas](#input\_replication\_readonly\_replicas) | Specify the number of read-only replicas under the replication deployment. | `number` | `1` | no |
7171
| <a name="input_resources"></a> [resources](#input\_resources) | Specify the computing resources.<br><br>Examples:<pre>resources:<br> cpu: number, optional<br> memory: number, optional # in megabyte</pre> | <pre>object({<br> cpu = optional(number, 0.25)<br> memory = optional(number, 1024)<br> })</pre> | <pre>{<br> "cpu": 0.25,<br> "memory": 1024<br>}</pre> | no |

main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ locals {
5454
}
5555

5656
module "master" {
57-
source = "github.com/walrus-catalog/terraform-docker-containerservice?ref=v0.1.0&depth=1"
57+
source = "github.com/walrus-catalog/terraform-docker-containerservice?ref=v0.2.1&depth=1"
5858

5959
context = {
6060
project = {
@@ -177,7 +177,7 @@ module "master" {
177177
module "slave" {
178178
count = local.architecture == "replication" ? var.replication_readonly_replicas : 0
179179

180-
source = "github.com/walrus-catalog/terraform-docker-containerservice?ref=v0.1.0&depth=1"
180+
source = "github.com/walrus-catalog/terraform-docker-containerservice?ref=v0.2.1&depth=1"
181181

182182
context = {
183183
project = {

schema.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ components:
1313
type: object
1414
description: |
1515
Specify the infrastructure information for deploying.
16+
default:
17+
domain_suffix: cluster.local
18+
network_id: local-walrus
1619
required:
1720
- network_id
1821
properties:
@@ -35,7 +38,7 @@ components:
3538
order: 1
3639
x-walrus-ui:
3740
colSpan: 12
38-
group: Basic
41+
group: Advanced
3942
order: 2
4043
architecture:
4144
title: Architecture
@@ -211,3 +214,4 @@ components:
211214
x-walrus-ui:
212215
groupOrder:
213216
- Basic
217+
- Advanced

variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ EOF
4343
network_id = optional(string, "local-walrus")
4444
domain_suffix = optional(string, "cluster.local")
4545
})
46+
default = {
47+
network_id = "local-walrus"
48+
domain_suffix = "cluster.local"
49+
}
4650
}
4751

4852
#

0 commit comments

Comments
 (0)