OCI Terraform Provider – code and state file generator…
During the last HashiConf2019 I was watching these two guys from Oracle Cloud Infrastructure (OCI) and their presentation which was really interesting. Now you can watch it online (check-up the link below). Alex Ng and Leon Kuperman have presented approaching features of OCI Terraform Provider. This new feature seems to be the perfect option for early adopters of OCI which has build their infra directly from UI and now they want to switch their approach into DevOps and Infrastructure as Code concept. New OCI Terraform Provider will be capable to introspect compartment in OCI via RestAPI and generate Terraform code on the fly for all of your VCNs, subnets, compute and DBSystems. Then you can also create a proper Terraform’s state file that will consist of all data. Since that moment you can forget about your OCI Console and continue just with Terraform code 🙂
Bon Appetit,
Martin, The Cook.
UPDATE (5-Nov-2019): With Provider 3.5 discovery has been finally enabled: “Beginning with version 3.50, the terraform-oci-provider can be run as a command-line tool to discover resources that have been created within Oracle Cloud Infrastructure compartments and generate Terraform configuration files for the discovered resources.”Â
More details under this link:Â https://www.terraform.io/docs/providers/oci/guides/resource_discovery.html