Dev CS support execution of Terraform. You can create build jobs in Dev CS where you first deploy the platform (IaaS and PaaS). Then you use the jobs in the pipeline. It means that you can have full deployment pipeline in Dev CS that both have platform setup as part of the pipeline together with your application.
Oracle Develop Cloud Service is a lot more than only Terraform. https://docs.oracle.com/en/cloud/paas/developer-cloud/csdcs/oracle-developer-cloud-service.html#GUID-010F5CE7-87DC-4870-BA7E-DE0760B8DC40
The Benefits
By using Dev CS you get a some nice benefits
– Versioning of you Terraform file
– Roll back possibility
– Track changes
– Markdown
– Documentation
– Integration options
Prerequisites
You need to have some stuff in place before you can get Terraform to work on Dev CS
Develop Cloud Service
We need an instance of Dev CS.
Guide:
– Sign in – https://cloud.oracle.com/sign-in
– Find Develop CS on your Dashboard, can be you have to ‘Customize Dashboard’ to see it
– Click the Sandwich and choose ‘Open Service Console’
– Here you can create a new instance of Dev CS
Project
In Dev CS we need a Project. Project is a collection of Git repositories, branch merge requests, wikis, issues, deployment configurations, and builds.
Configure Object Storage
In Dev CS you have a feature called Artifact. Here you can store data and re-use it later in the process. The Artifact need to be stored and Object storage is a fine place to do that, because if the structure of Object storage.
Configure Build VM
When you run you build job. The job will be executed on a Build VM.
Configure Build VM Template
The build VM does not have any application installed by default. We need to Terraform installed on the Build VM we will you. Therefore we need to create a Build VM Template
Note: When you get to ‘Configuring a VM Template’s Software’ step 3. Here you have to add Terraform
Git Repository
The Git Repo is where we will store our Terraform files and other need binaries. Therefore we need one
When you have created the Git Repo, then please add you Terraform files and other need files
How to create Terraform Build Job
There have been many Prerequisites that need to be in place before you can create you build job for Terraform. Where you can deploy the wanted platform you like to have.
- Open your Project
- Go to Build
- Add ‘New Job’
- Give it a name and choose your software template
- Configure your Job
- In ‘Source Control’ add Source Control Git and select you Terraform Repository
- Go to the ‘Builders’ tab and add ‘Builder’ Unix Shell Builder. Here you type your need command.
- Go now to ‘Post Build’ tab and ‘Post Build Actions’ select ‘Artifact Archiver and type what file(s) you like to add to the Archive after the build.
- Now Save it
- Now you can run your job
- You can use ‘Build Log’ to check what is going on and you can Compute Service Console to see the output.