You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How do I use the Terraform OCI provider with only the access token inside AWS CodeBuild?

Question
1
Views
0
Comments

I am trying to do terraform apply for a very simple project with a single data resource inside AWS CodeBuild and the provider.tf file looks like:

terraform {
  required_providers {
    oci = {
      source  = "oracle/oci"
      version = "~> 5.0"
    }
  }
}

provider "oci" {
  auth = "SecurityToken"
  config_file_profile = "DEFAULT"
  region = "us-ashburn-1"
}

Now, the OCI security access token is available in the CodeBuild container and I'd like to authenticate the resource deployment only based on this. To avoid doing oci authenticate from the CodeBuild container, I created a folder structure similar to what it would have been if oci authenticate had been called (Config file shown below).

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!