Coder Social home page Coder Social logo

Comments (4)

tadakamalla avatar tadakamalla commented on June 13, 2024

BTW, this is happening while I am trying to apply.

from terraform-provider-oci.

sivaedupuganti-oracle avatar sivaedupuganti-oracle commented on June 13, 2024

This could happen when you provide an empty string for private_key variable. Make sure to set the environment variable to the content of the key file.
> export TF_VAR_private_key=$(cat /full/path/to/key.pem)

Instead, you can use the private_key_path variable and provide the full path to the key file.
> export TF_VAR_private_key_path=/full/path/to/key.pem

You only need to set one of these env variables. Whichever one you chose, make sure to use the same variable in the tf config file. In my case, I chose private_key_path

$ cat simple_vcn/vcn.tf
variable "tenancy_ocid" {}
variable "user_ocid" {}
variable "fingerprint" {}
variable "private_key_path" {}
variable "compartment_ocid" {}

provider "baremetal" {
tenancy_ocid = "${var.tenancy_ocid}"
user_ocid = "${var.user_ocid}"
fingerprint = "${var.fingerprint}"
private_key_path= "${var.private_key_path}"
}

...

When I run terraform plan simple_vcn, it prompts for the private_key, but its optional. Just press enter and continue.

provider.baremetal.private_key
  (Optional) A PEM formatted RSA private key for the user.
  A private_key or a private_key_path must be provided.

  Enter a value: <press enter>

provider.baremetal.private_key_password
  (Required) The password used to secure the private key.

from terraform-provider-oci.

tadakamalla avatar tadakamalla commented on June 13, 2024

Thank you, it worked !!

from terraform-provider-oci.

craigcarl-oracle avatar craigcarl-oracle commented on June 13, 2024

Thanks Siva!

from terraform-provider-oci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.