Skip to content
/ iacbox Public

provision an instance for iac development on oci

License

Notifications You must be signed in to change notification settings

kral2/iacbox

Repository files navigation

IACBOX

provision an instance for iac development on oci

release bash hcl license

Table of Contents

  1. About
  2. Requirements
  3. Providers
  4. Inputs
  5. Outputs

About

diagram

This module deploys an instance with the necessary tools to start developing Infrastructure as Code solutions on OCI.

General development tooling:

  • Git, pre-commit and the GitHub cli
  • Python virtualenvwrapper
  • Go
  • container tooling

IaC tooling:

  • HashiCorp Stack: Packer, Terraform, Consul, Vault, Nomad
  • terraform-docs
  • Ansible and with useful community roles

OCI related tooling and SDKs:

  • oci-cli and its smart wrapper o
  • OCI Python SDK
  • ansible-oci collection

This is the deployed infrastructure:

diagram

The module also create an OCI Dynamic-Group and the associated OCI Policy to grant API manage authorization to the iacbox instance over the instance's compartment.

Requirements

Name Version
terraform >= 1.0.0
oci >=4.40.0

Modules

Name Source Version
instance_iacbox oracle-terraform-modules/compute-instance/oci 2.3.0
vcn_iacbox oracle-terraform-modules/vcn/oci 3.0.0

Resources

Name Type
oci_core_subnet.vcn_iacbox_public resource
oci_identity_dynamic_group.iacbox resource
oci_identity_policy.dynamic_group_iacbox resource
oci_core_images.images data source

Inputs

Name Description Type Default Required
block_storage_sizes_in_gbs Sizes of volumes to create and attach to each instance. list(string) [] no
compartment_id compartment ocid where to create all resources string n/a yes
defined_tags predefined and scoped to a namespace to tag the resources created using defined tags. map(string) null no
fingerprint n/a string null no
freeform_tags simple key-value pairs to tag the resources created using freeform tags. map(string) null no
instance_ad_number The availability domain number of the instance. If none is provided, it will start with AD-1 and continue in round-robin. number 1 no
instance_count Number of identical instances to launch from a single module. number 1 no
instance_display_name (Updatable) A user-friendly name for the instance. Does not have to be unique, and it's changeable. string "iacbox" no
instance_flex_memory_in_gbs (Updatable) The total amount of memory available to the instance, in gigabytes. number 6 no
instance_flex_ocpus (Updatable) The total number of OCPUs available to the instance. number 1 no
instance_state (Updatable) The target state for the instance. Could be set to RUNNING or STOPPED. string "STOPPED" no
private_key n/a string null no
private_key_path n/a string null no
public_ip Whether to create a Public IP to attach to primary vnic and which lifetime. Valid values are NONE, RESERVED or EPHEMERAL. string "RESERVED" no
region n/a string null no
shape The shape of an instance. string "VM.Standard.A1.Flex" no
source_ocid The OCID of an image or a boot volume to use, depending on the value of source_type. string null no
source_type The source type for the instance. string "image" no
ssh_public_keys Public SSH keys to be included in the ~/.ssh/authorized_keys file for the default user on the instance. To provide multiple keys, see docs/instance_ssh_keys.adoc. string null no
tenancy_ocid n/a string null no
user_data Provide your own base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. string null no
user_ocid n/a string null no

Outputs

Name Description
instance_iacbox ocid of created instances.