This is a guest blog written in collaboration with the Pulumi team Isaac Harris (Pulumi), Laura Santamaria (Pulumi), Rahul M R (Oracle)
Pulumi is an infrastructure as code platform that empowers developers and operators to define, deploy and manage resources on practically any cloud using modern programming languages and integrations with over 100 platforms like Datadog, Cloudflare, and GitHub. For the past few years, we have had a steady stream of customer requests to add Pulumi support for Oracle Cloud Infrastructure (OCI) so they can take advantage of OCI innovations such as off-box virtualization, L2 network virtualization, nonblocking networks, and more. Today, we’re excited to announce a strategic partnership between Pulumi and Oracle in addition to a preview of our Pulumi OCI provider.
Universal Infrastructure as Code on OCI
Previously, when OCI customers needed to manage cloud resources they had two primary options:
- Using the Oracle Cloud Console to graphically browse and manage resources
- Through Resource Manager – a managed Terraform service
Now, we’re adding a third option: using Pulumi to manage OCI resources with programming languages familiar to every software developer: JavaScript/TypeScript, Python, Java, Go, .NET (C#, F#, VB.NET). and YAML.
Why is this important? More teams are adopting cloud engineering as a means of accelerating the delivery of cloud-based solutions. This means applying software engineering practices to cloud infrastructure in a continuous build-test-deploy release cycle.
Pulumi makes adopting cloud engineering easy because it supports all of the libraries, test frameworks, IDEs, package managers, and tooling for each language ecosystem out of the box. No plugins or special configuration is required.
For example, when you author infrastructure as code using Python in VSCode, IntelliSense code hinting just works as you would expect and you get can explore OCI resource properties in-line as you define your deployment. No more guessing about syntax or bouncing between your IDE and a docs page. Pulumi even has built-in integrations with popular CI/CD. tooling so your infrastructure release process can follow your chosen software release process.
Pulumi also makes it easy to define and deploy multiple environments Stacks for each stage of development, testing, and production – enabling teams to create ephemeral environments for end-to-end testing prior to release.
Finally, Pulumi helps teams follow best practices with built-in secrets management and CrossGuard “policy as code” capabilities. This enables operators to define rules to proactively block non-compliant infrastructure configurations from being provisioned.
The net result of these capabilities is improved developer productivity and the typical Pulumi Enterprise customer accelerates their cloud deployments by 250% year-over-year – while improving the security posture of their cloud resources.
A simple deployment example
Let’s try out a code example. We’ll stand up an OKE cluster with Pulumi.
Prerequisites
To get started, you need to have the following tools installed:
- A Pulumi account and token, signed in on the Pulumi CLI
- If you don’t have a Pulumi account, go to the signup page.
- Python 3.8 or 3.9
We will work from this project. Detailed instructions can be found at [the README for the example on GitHub, but we’ll talk through the process here.

First, Create a Pulumi Program
Pulumi uses the directory to define a Pulumi project. When we initialize the project on the command line with ‘pulumi new’, the Pulumi CLI either uses templates to provide boilerplate for the Pulumi program and various other necessary files or, as in this case, pulls down a source-controlled repository to use for creating the program.
Next, Add a Configuration
The next steps are to add configuration values into Pulumi. Configuration values are specific to a stack, or an environment managed by Pulumi. If a value is not specific to a stack, we often define it in code as a variable, but here, we have a number of values that will change depending on the stack being used.
In addition to the various configuration information for a stack, you will need the various credentials necessary to allow Pulumi to talk with OCI. These credentials can be passed as environment variables or as encrypted secrets within the configuration file. Generally, Pulumi recommends using encrypted secrets for security reasons, especially if you’re running these commands on a pipeline or other automated system.
Finally, Preview and Deploy the Infrastructure
Once you’ve configured your project, the final steps are to preview the deployment and then stand everything up! We do this with `pulumi up`, which provides an initial preview before prompting you to approve the deployment. You can choose to view the details of the deployment before approving, which allows you to ensure that everything matches what you expected based on your code.
After approving the deployment, you can track the resources getting deployed to your environment via the command line or, if you chose to use the Pulumi Service, you can head to app.pulumi.com, log in, and explore your stack’s deployment history (including anything in the middle of being provisioned), your stack’s state, the graph of the resources, and more.
In the end, you can head over to the OCI Console and view your clusters.

Tearing Everything Down
As this was just an example, you’ll want to tear down the resources when you’re done. To do that, run `pulumi destroy` from the same directory that holds your Pulumi project and program. Pulumi will ask for confirmation, then tear down the resources. Note that Pulumi does not remove the configuration information or stack deployment history from state on the Pulumi Service, so if you would like to remove those pieces of information as well, run `pulumi stack rm <stack-name>` to clear everything.
Conclusion
This is just one example of how Pulumi brings the power of modern programming languages to managing the OCI platform. We’ll be adding more examples in more languages very soon. In the meantime, try the new Pulumi OCI Provider out for yourself and let us know what you think on our Community Slack.
Join us on July 14th, we’ll be hosting a workshop on 14 July 2022 if you’d like to come learn more about Pulumi and stand up your first stack with us on Oracle Cloud; sign up.
