Oracle cloud terraform v2.0 is here with new modules

Mohammed Binsabbar
2 min readFeb 20, 2022

After almost 9 months since the release of v1.0 of OCI Terraform modules, a lot has happened to improve existing modules and introduce more.

snippet of volumes module input

New Features

Here is a highlight of the major features in v2:

  • Creating and managing encryption/signing keys (vault): vault module will allow you to create keys so you can use them in volume encryption, and also in HashiCorp Vault as master keys.
  • Managing volumes attachments and backup (volumes): You will be able to easily create and manage extra volumes, and attach them to multiple instances.
  • Attaching multiple VNICs and multiple private IPs (instances): Having multiple vnics are essential with Firewall deployments. With v2 instances you can create multiple vnics in different subnets, while also attaching multiple static private IPs to each vnic.
  • Configuration for NAT, Internet, Service Gateways (network): Greater controller over the existence of gateways inside the VCN, with also an ability to assign a reserved public IP to the NAT Gateway.

There are also some other new features and enhancements, check the full release note in https://github.com/Binsabbar/oracle-cloud-terraform/releases/tag/v2.0

Breaking Changes

In v1, there were many designs that affected new features implementation. As a result, some breaking changes had to be made in order to enhance module design and input, and to support new features.

Affected modules are, public_ip, object-storage, network, instances, and kubernetes.

The actions required in are can be one of the following:

  • Terraform state object renaming using terraform mv
  • Adding new empty values/map to the module input or one of the sub-object inputs.

https://github.com/Binsabbar/oracle-cloud-terraform/releases/tag/v2.0 will take you step by step to successfully upgrade to v2.

What’s Next

As we make more uses of oracle cloud infrastructure, we will probably be facing more features/modules that are not implemented in v2, and the aim is to release frequently new none breaking changes.

What is needed to be done currently are

  • More complete examples that utilizes multiple modules.
  • Input validation for module inputs. This has started only in volumes module.

I hope you are finding these modules useful for you!

Thanks!

Binsabbar

Note that there is already a different more popular OCI terraform modules. I built mine to fit a specific need that I had with more flexibility. I tried to keep my modules as compact as possible and moduler. In that, to make one module work, you might need to plug in multiple modules together (for example to use Kubernetes module, you will need to use network module and create vcn first).

--

--

Mohammed Binsabbar

DevOps Engineer, who love building great and useful stuff