github.com/nevins-b/terraform@v0.3.8-0.20170215184714-bbae22007d5a/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 ports = { 26 protocol = "tcp" 27 number = "80" 28 } 29 environments { 30 key = "key1" 31 value = "value1" 32 } 33 } 34 ``` 35 36 ## Argument Reference 37 38 The following arguments are supported: 39 40 * `name` - (Required, string) The name of the container. 41 * `image` - (Required, string) The ID of the image to back this container.It must be a public image on DockerHub. 42 * `instances` - (Optional, int) The count of the instance. It must be between `1` and `10`. 43 * `memory` - (Optional, int) The size of the instance RAM.It must be `256` or `512`. 44 * `endpoint` - (Optional,string) The subdomain part of the endpoint assigned by Arukas. If it is not set, Arukas will do automatic assignment. 45 * `ports` - (Required , block) See [Ports](#ports) below for details. 46 * `environments` - (Required , block) See [Environments](#environments) below for details. 47 * `cmd` - (Optional , string) The command of the container. 48 49 <a id="ports"></a> 50 ### Ports 51 52 `ports` is a block within the configuration that can be repeated to specify 53 the port mappings of the container. Each `ports` block supports 54 the following: 55 56 * `protocol` - (Optional, string) Protocol that can be used over this port, defaults to `tcp`,It must be `tcp` or `udp`. 57 * `number` - (Optional, int) Port within the container,defaults to `80`, It must be between `1` to `65535`. 58 59 <a id="environments"></a> 60 ### Environments 61 62 `environments` is a block within the configuration that can be repeated to specify 63 the environment variables. Each `environments` block supports 64 the following: 65 66 * `key` - (Required, string) Key of environment variable. 67 * `value` - (Required, string) Value of environment variable. 68 69 70 ## Attributes Reference 71 72 The following attributes are exported: 73 74 * `id` - The ID of the container. 75 * `app_id` - The ID of the Arukas application to which the container belongs. 76 * `name` - The name of the container. 77 * `image` - The ID of the image to back this container. 78 * `instances` - The count of the instance. 79 * `memory` - The size of the instance RAM. 80 * `endpoint` - The subdomain part of the endpoint assigned by Arukas. 81 * `ports` - See [Ports](#ports) below for details. 82 * `environments` - See [Environments](#environments) below for details. 83 * `cmd` - The command of the container. 84 * `port_mappings` - See [PortMappings](#port_mappings) below for details. 85 * `endpoint_full_url` - The URL of endpoint. 86 * `endpoint_full_hostname` - The Hostname of endpoint. 87 88 <a id="port_mappings"></a> 89 ### PortMappings 90 91 `port_mappings` is a block within the configuration that 92 the port mappings of the container. Each `port_mappings` block supports 93 the following: 94 95 * `host` - The name of the host actually running the container. 96 * `ipaddress` - The IP address of the host actually running the container. 97 * `container_port` - Port within the container. 98 * `service_port` - The actual port mapped to the port in the container.