Terraform module which deploys container service on Docker.
module "example" {
source = "..."
infrastructure = {
network_id = "..."
}
containers = [
{
image = "nginx:alpine"
resources = {
cpu = 0.1
memory = 100 # in megabyte
}
ports = [
{
internal = 80
external = 80
}
]
checks = [
{
delay = 10
type = "http"
http = {
port = 80
}
}
]
}
]
}
Please read our contributing guide if you're interested in contributing to Walrus template.
Name | Version |
---|---|
terraform | >= 1.0 |
docker | >= 3.0.2 |
local | >= 2.4.0 |
random | >= 3.5.1 |
Name | Version |
---|---|
docker | >= 3.0.2 |
local | >= 2.4.0 |
random | >= 3.5.1 |
terraform | n/a |
No modules.
Name | Type |
---|---|
docker_container.inits | resource |
docker_container.pause | resource |
docker_container.runs | resource |
docker_container.unhealthy_restart | resource |
docker_image.inits | resource |
docker_image.pause | resource |
docker_image.runs | resource |
docker_image.unhealthy_restart | resource |
docker_volume.ephemeral_volumes | resource |
local_file.ephemeral_files | resource |
random_string.name_suffix | resource |
terraform_data.run_checks | resource |
terraform_data.run_executes | resource |
terraform_data.run_resources | resource |
docker_network.network | data source |
docker_registry_image.inits | data source |
docker_registry_image.pause | data source |
docker_registry_image.runs | data source |
docker_registry_image.unhealthy_restart | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
containers | Specify the container items to deploy. Examples: containers: |
list(object({ |
n/a | yes |
context | Receive contextual information. When Walrus deploys, Walrus will inject specific contextual information into this field. Examples: context: |
map(any) |
{} |
no |
deployment | Specify the deployment action. Examples: deployment: |
object({ |
{} |
no |
infrastructure | Specify the infrastructure information for deploying. Examples: infrastructure: |
object({ |
{ |
no |
Name | Description |
---|---|
address | The address, a string only has host, might be a comma separated string or a single string. |
connection | The connection, a string combined host and port, might be a comma separated string or a single string. |
context | The input context, a map, which is used for orchestration. |
endpoints | The endpoints, a string map, the key is the name, and the value is the URL. |
ports | The port list of the service. |
refer | The refer, a map, including hosts, ports and account, which is used for dependencies or collaborations. |
Copyright (c) 2023 Seal, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at LICENSE file for details.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.