Skip to content

Terraform Module for creating an Oracle Cloud Infrastructure Container Instance resource in Compute service

License

Notifications You must be signed in to change notification settings

avaloqcloud/terraform-oci-container-instance

Repository files navigation

Deploy to Oracle Cloud

Generate terraform docs

Terraform OCI Container Instance

The code provides a reusable Terraform module that provisions a container instance on Oracle Cloud Infrastructure.

For the nitty-gritty details, see the CHANGELOG.md file.

Requirements

Name Version
terraform ~> 1.2
oci 5.18.0

Providers

Name Version
oci 5.18.0

Modules

No modules.

Resources

Name Type
oci_container_instances_container_instance.container_instance resource

Inputs

Name Description Type Default Required
availability_domain The availability domain where the container instance runs. string n/a yes
compartment_ocid The OCID of the compartment. string n/a yes
container_restart_policy The container restart policy is applied for all containers in container instance. string "ALWAYS" no
containers The containers to create on this container instance.
list(object({
display_name = optional(string)
image_url = string
environment_variables = optional(map(string))

command = optional(list(string))
arguments = optional(list(string))

volume_mounts = optional(list(object({
volume_name = string
mount_path = string
})))

resource_config = optional(map(object({
memory_limit_in_gbs = optional(number)
vcpus_limit = optional(number)
})))

memory_limit_in_gbs = optional(number)
vcpus_limit = optional(number)

working_directory = optional(string)
}))
n/a yes
display_name A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. If you don't provide a name, a name is generated automatically. string null no
hostname_label The hostname (DNS) name of the container instance. string null no
image_pull_secrets The image pulls secrets so you can access private registry to pull container images.
list(object({
registry_endpoint = string
secret_type = string
secret_id = optional(string)
username = optional(string)
password = optional(string)
}))
[] no
memory_in_gbs The total amount of memory available to the container instance, in gigabytes. number n/a yes
ocpus The total number of OCPUs available to the container instance. number n/a yes
shape The shape of the container instance. The shape determines the resources available to the container instance. string n/a yes
subnet_id The OCID of the subnet to create the VNIC in. string n/a yes
volumes A volume is a directory with data that is accessible across multiple containers in a container instance.
list(object({
name = string
volume_type = string
backing_store = optional(string)

configs = optional(list(object({
data = optional(string)
file_name = optional(string)
})))
}))
[] no

Outputs

No outputs.

About

Terraform Module for creating an Oracle Cloud Infrastructure Container Instance resource in Compute service

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages