github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/arukas/r/container.html.markdown (about) 1 --- 2 layout: "arukas" 3 page_title: "Arukas: container" 4 sidebar_current: "docs-arukas-resource-container" 5 description: |- 6 Manages Arukas Containers 7 --- 8 9 # arukas_container 10 11 Provides container resource. This allows container to be created, updated and deleted. 12 13 For additional details please refer to [API documentation](https://arukas.io/en/documents-en/arukas-api-reference-en/#containers). 14 15 ## Example Usage 16 17 Create a new container using the "NGINX" image. 18 19 ```hcl 20 resource "arukas_container" "foobar" { 21 name = "terraform_for_arukas_test_foobar" 22 image = "nginx:latest" 23 instances = 1 24 memory = 256 25 26 ports = { 27 protocol = "tcp" 28 number = "80" 29 } 30 31 environments { 32 key = "key1" 33 value = "value1" 34 } 35 } 36 ``` 37 38 ## Argument Reference 39 40 The following arguments are supported: 41 42 * `name` - (Required, string) The name of the container. 43 * `image` - (Required, string) The ID of the image to back this container.It must be a public image on DockerHub. 44 * `instances` - (Optional, int) The count of the instance. It must be between `1` and `10`. 45 * `memory` - (Optional, int) The size of the instance RAM.It must be `256` or `512`. 46 * `endpoint` - (Optional,string) The subdomain part of the endpoint assigned by Arukas. If it is not set, Arukas will do automatic assignment. 47 * `ports` - (Required , block) See [Ports](#ports) below for details. 48 * `environments` - (Required , block) See [Environments](#environments) below for details. 49 * `cmd` - (Optional , string) The command of the container. 50 51 <a id="ports"></a> 52 ### Ports 53 54 `ports` is a block within the configuration that can be repeated to specify 55 the port mappings of the container. Each `ports` block supports 56 the following: 57 58 * `protocol` - (Optional, string) Protocol that can be used over this port, defaults to `tcp`,It must be `tcp` or `udp`. 59 * `number` - (Optional, int) Port within the container,defaults to `80`, It must be between `1` to `65535`. 60 61 <a id="environments"></a> 62 ### Environments 63 64 `environments` is a block within the configuration that can be repeated to specify 65 the environment variables. Each `environments` block supports 66 the following: 67 68 * `key` - (Required, string) Key of environment variable. 69 * `value` - (Required, string) Value of environment variable. 70 71 72 ## Attributes Reference 73 74 The following attributes are exported: 75 76 * `id` - The ID of the container. 77 * `app_id` - The ID of the Arukas application to which the container belongs. 78 * `name` - The name of the container. 79 * `image` - The ID of the image to back this container. 80 * `instances` - The count of the instance. 81 * `memory` - The size of the instance RAM. 82 * `endpoint` - The subdomain part of the endpoint assigned by Arukas. 83 * `ports` - See [Ports](#ports) below for details. 84 * `environments` - See [Environments](#environments) below for details. 85 * `cmd` - The command of the container. 86 * `port_mappings` - See [PortMappings](#port_mappings) below for details. 87 * `endpoint_full_url` - The URL of endpoint. 88 * `endpoint_full_hostname` - The Hostname of endpoint. 89 90 <a id="port_mappings"></a> 91 ### PortMappings 92 93 `port_mappings` is a block within the configuration that 94 the port mappings of the container. Each `port_mappings` block supports 95 the following: 96 97 * `host` - The name of the host actually running the container. 98 * `ipaddress` - The IP address of the host actually running the container. 99 * `container_port` - Port within the container. 100 * `service_port` - The actual port mapped to the port in the container.