bx2cloud_container (Resource)
Example Usage
resource "bx2cloud_container" "my_container" {
subnetwork_id = bx2cloud_subnetwork.my_subnetwork.id
image = "ubuntu:24.04"
cmd = ["sleep", "infinity"]
status = "running"
env = {
FOO = "bar"
}
}
Schema
Required
image(String) The container image name from an OCI compliant registry.subnetwork_id(String) The subnetwork this container is attached to.
Optional
cmd(List of String) Overides the default commands from the original image. Corresponds to Dockerfile'sCMDinstruction.entrypoint(List of String) Overides the default executable from the original image. Corresponds to Dockerfile'sENTRYPOINTinstruction.env(Map of String) Appends extra environment variables to the default environment variables from the original image. Corresponds to Dockerfile'sENVinstruction.status(String) The status of the container:runningorstopped.
Read-Only
created_at(String)id(String) The ID of this resource.ip(String) Specifies the container's allocated address and mask prefix length in CIDR notation. For example10.0.8.3/24,192.168.10.8/25.started_at(String) The time the container was last started at.updated_at(String)
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
terraform import bx2cloud_container.my_container 42