You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**The terraform provider has been renamed, see [this wiki](https://github.com/oracle/terraform-provider-oci/wiki/Oracle-Terraform-Provider-Name-Change) for information on migration steps.**
3
-
4
-
*Legacy provider documentation (for v1.0.18 and earlier) can be found [here](https://github.com/oracle/terraform-provider-oci/tree/v1.0.18/docs)*
5
-
2
+
**OCI Terraform Provider v2.2.0 and above is not compatible with Terraform binaries below v0.10.1. To use the latest OCI
3
+
Provider, upgrade your version of Terraform to v0.10.1 or higher.**
6
4
7
5
# ___ ____ _ ____ _ _____
8
6
# / _ \| _ \ / \ / ___| | | ____|
9
7
# | | | | |_) | / _ \| | | | | _|
10
8
# | |_| | _ < / ___ | |___| |___| |___
11
9
# \___/|_| \_/_/ \_\____|_____|_____|
12
10
***
13
-
# Terraform provider for Oracle Cloud Infrastructure
11
+
# Terraform Provider for Oracle Cloud Infrastructure
Oracle customers now have access to an enterprise class, developer friendly orchestration tool they can use to manage [Oracle Cloud Infrastructure](https://cloud.oracle.com/cloud-infrastructure).
18
-
19
-
This Terraform provider is OSS, available to all OCI customers at no charge.
15
+
OCI Terraform Provider gives Oracle customers access to an enterprise class, developer friendly orchestration tool they
16
+
can use to manage [Oracle Cloud Infrastructure](https://cloud.oracle.com/cloud-infrastructure). This Terraform provider
17
+
is open-source software, available to all OCI customers at no charge.
20
18
21
19
## Compatibility
22
-
The provider is compatible with Terraform v0.10.x.
20
+
The OCI Terraform Provider is compatible with Terraform v0.10.1 or greater.
23
21
24
22
### Coverage
25
-
The Terraform provider provides coverage for the entire OCI API, with some minor exceptions.
23
+
The OCI Terraform Provider supports the entire OCI API, with a few minor exceptions.
26
24
27
25
## Getting started
28
-
Be sure to read the FAQ and Writing Terraform configurations for OCI in [/docs](https://github.com/oracle/terraform-provider-oci/tree/master/docs).
26
+
27
+
To see supported OCI resources and view documentation go to the OCI resource and datasource documentation
28
+
[Table of Contents](https://github.com/oracle/terraform-provider-oci/tree/master/docs/Table%20of%20Contents.md).
29
+
30
+
Be sure to read the [FAQ](https://github.com/oracle/terraform-provider-oci/tree/master/docs/FAQ.md)
31
+
and [Writing Terraform configurations for OCI](https://github.com/oracle/terraform-provider-oci/tree/master/docs/Writing%20Terraform%20configurations%20for%20OCI.md) document
32
+
in the [docs](https://github.com/oracle/terraform-provider-oci/tree/master/docs) section.
29
33
30
34
## Installation
31
-
**NOTE** Terraform v0.10.x introduces a change to plugin management where
32
-
previous v0.9.x configuration no longer applies. See note below.
Required Keys and OCIDs - https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm
68
+
### Setup credentials for using OCI
69
+
Every call to OCI infrastructure requires a minimum of four credentials.
70
+
These are `tenancy_ocid`, `user_ocid`, `fingerprint` and `private_key_path`. It is common to export these values as
71
+
environment variables, or source them in different bash profiles when executing Terraform commands. See the next
72
+
section for OS specific instructions on configuring these environment values.
87
73
88
-
If you primarily work in a single compartment consider exporting that compartment's OCID as well. Remember that the tenancy OCID is also the OCID of the root compartment.
74
+
Here is breakdown of required as well as commonly set configuration values:
75
+
-`tenancy_ocid` - The global identifier for your account, always shown on the bottom of the web console.
76
+
-`user_ocid` - The identifier of the user account you will be using Terraform with.
77
+
-`private_key_path` - The path to the private key stored on your computer. The public key portion must be added to the
78
+
user account above in the _API Keys_ section of the web console.
79
+
-`fingerprint` - The fingerprint of the public key added in the above user's _API Keys_ section of the web console.
80
+
81
+
For details on how to create and configure keys see [Required Keys and OCIDs](https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm).
82
+
83
+
If you primarily work in a single compartment consider defining a `compartment_ocid` as well. The tenancy OCID is also
84
+
the OCID of the root compartment, so that can be used where resources expect a `compartment_id` or `compartment_ocid`.
89
85
90
86
#### \*nix
91
-
If your TF configurations are limited to a single compartment/user then
92
-
using this `bash_profile` option will work well. For more complex
93
-
environments you may want to maintain multiple sets of environment
94
-
variables.
87
+
If your Terraform configurations are limited to a single compartment or user then using this `bash_profile` option
88
+
will work well. For more complex environments you may want to maintain multiple sets of environment variables.
95
89
See the [compute single instance example](https://github.com/oracle/terraform-provider-oci/tree/master/docs/examples/compute/instance) for more info.
96
90
97
91
In your `~/.bash_profile` set these variables
98
92
```
99
-
export TF_VAR_tenancy_ocid=
100
-
export TF_VAR_user_ocid=
101
-
export TF_VAR_compartment_ocid=<The tenancy OCID can be used as the compartment OCID of your root compartment>
### Not Authenticated Error when configuring Terraform
2
+
3
+
_If the Terraform CLI gives an error message like:_
4
+
5
+
`* oci_core_vcn.resource1: Service error:NotAuthenticated. The required information to complete authentication was not provided or was incorrect.. http status code: 401`
6
+
7
+
* Verify you have properly set `user_ocid`, `tenancy_ocid`, `fingerprint` and `private_key_path`
8
+
* Verify your `private_key_path` is pointing to your private key and not the corresponding public key
9
+
* Verify you have added the corresponding public key to the user account you have specified with `user_ocid`
10
+
* Verify the public/private key pairs you are using are of the correct format
11
+
* see: [Required Keys](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/apisigningkey.htm) for details on the correct format and how to generate keys
12
+
* Verify the user account is part of a group with the appropriate permissions to perform the actions in the plan you are executing
13
+
* Verify your Tenancy has been subscribed to the Region you are targeting in your plan
14
+
15
+
16
+
### Error message after upgrading OCI Terraform Provider
17
+
18
+
_If the Terraform CLI gives an error message like:_
19
+
20
+
```
21
+
Error asking for user input: 1 error(s) occurred:
22
+
23
+
* provider.oci: dial unix /var/folders/6r/8fk5dmbj4_z3sl0mc_y_fhjw0000gn/T/plugin811254328|netrpc: connect: no such file or directory
24
+
```
25
+
26
+
You are likely using a version of the OCI Terraform Provider that is not compatible with the Terraform binary you have
27
+
installed. For OCI Provider versions v3.x.x and above, a minimum Terraform version of v.0.10.1 is required.
0 commit comments