Maintain FIPS compliance while using the Oracle Cloud Infrastructure Terraform provider.
This page describes requirements and best practices for using Terraform with a FIPS-compatible version of the OCI Terraform provider.
FIPS Encryption
To ensure the highest security standards, move traffic from Terraform to OCI endpoints over a TLS connection established with an HTTP client using FIPS certified encryption.
The standard OCI Terraform Provider is implemented in Go. Go's native cryptography implementations, while fully capable of establishing secure TLS connections with OCI endpoints, haven't been FIPS certified.
For Terraform traffic to transit to OCI endpoints over FIPS-compliant connections, you must use a special version of the Terraform provider that uses FIPS certified cryptography. This version of the OCI Terraform provider uses the FIPS 140-2 certifiedOracle Cloud Infrastructure for BoringCrypto instead of Go's native cryptography implementation. Read more about the Oracle Cloud Infrastructure for BoringCrypto here.
Installing the FIPS-Compliant Terraform Provider 🔗
The FIPS-compliant OCI Terraform provider is only available for Oracle Linux. You can install the provider using yum.
Configure the authentication method for the Terraform provider. See Authentication for more information.
Operating Terraform in a Single Region 🔗
To ensure that traffic between Terraform and OCI services doesn't transit over public internet infrastructure, we recommend that you run Terraform and the OCI Terraform provider from a Compute instance that's hosted in the same region as the resources they create and manage.
Creating a Compute Instance 🔗
After Terraform and the OCI Terraform provider are installed on an Oracle Linux machine, you can use Terraform and the following sample Terraform configuration file to:
Create a designated compute instance you can use to provision more infrastructure within the same region.
Install Terraform and the latest FIPS compliant OCI Terraform provider on the new instance.
Restrict communication with the instance to OCI endpoints and HTTPS using a service gateway.
Before using the new instance to run Terraform, update the security rules to prevent egress traffic to any third-party endpoints other than OCI services. You can make this update by removing the following egress rule from the Terraform configuration file's security-list1 resource and running terraform apply from the Oracle Linux machine:
// outbound tcp traffic on all ports
// remove this rule or comment it out to prevent egress traffic to third-party endpoints
#egress_security_rules {
# destination = "0.0.0.0/0"
# protocol = "6"
#}
After creating the instance, installing and configuring Terraform on the instance, and updating the security rules, you can use Terraform to provision more OCI infrastructure within the same region. Copy any other Terraform configuration files to an instance, sign in to the instance, and run Terraform commands as with any other Terraform provider: