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
Copy file name to clipboardExpand all lines: README.md
+21-16Lines changed: 21 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,11 @@ Oracle customers now have access to an enterprise class, developer friendly orch
9
9
10
10
This Terraform provider is OSS, available to all OBMCS customers at no charge.
11
11
12
+
## Compatibility
13
+
The provider is compatible with Terraform .8.\*, .8.8 is recommended. .9.\* compatibility is in the works.
14
+
12
15
### Coverage
13
-
The Terraform provider provides coverage for the entire BMC API excluding the Load Balancer Service, expected March 1 2017.
16
+
The Terraform provider provides coverage for the entire BMC API excluding the Load Balancer Service, expected first half of April 2017.
14
17
15
18
## Getting started
16
19
Be sure to read the FAQ and Writing Terraform configurations for OBMCS in [/docs](https://github.com/oracle/terraform-provider-baremetal/tree/master/docs).
@@ -42,26 +45,28 @@ Required Keys and OCIDs - https://docs.us-phoenix-1.oraclecloud.com/Content/API/
42
45
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.
If your TF configurations are limited to a single compartment/user then using this `bash_profile` option will work well. For more complex environments you may want to maintain multiple sets of environment variables. [See the single-compute example for an example.](https://github.com/oracle/terraform-provider-baremetal/tree/master/docs/examples/compute/single-instance)
Don't forget to `source ~/.bash_profile` once you've set these.
53
58
54
59
#### Windows
55
-
`setx TF_VAR_tenancy_ocid <value>`
56
-
`setx TF_VAR_user_ocid <value>`
57
-
`setx TF_VAR_fingerprint <value>`
58
-
`setx TF_VAR_private_key_path <value>`
59
-
`setx TF_VAR_private_key_password <value>`
60
-
60
+
```
61
+
setx TF_VAR_tenancy_ocid <value>
62
+
setx TF_VAR_user_ocid <value>
63
+
setx TF_VAR_fingerprint <value>
64
+
setx TF_VAR_private_key_path <value>
65
+
```
61
66
The variables won't be set for the current session, exit the terminal and reopen.
62
67
63
68
## Deploy an example configuration
64
-
Download the [VCN example configuration.](https://github.com/oracle/terraform-provider-baremetal/tree/master/docs/examples/network/simple_vcn)
69
+
Download the [Single instance example.](https://github.com/oracle/terraform-provider-baremetal/tree/master/docs/examples/compute/single-instance)
65
70
66
71
Edit it to include the OCID of the compartment you want to create the VCN. Remember that the tenancy OCID is the compartment OCID of your root compartment.
This example launches a Database System into an existing subnet and because it's an anti-pattern to launch an DBSystem in a subnet with Internet access, behind an existing bastion host. Database Systems don't support user-data scripts but there are still use cases where you might want to execute a script once the DBNode starts so we use the `file` and `remote-exec` provisoners to get through the bastion host and onto the instance. The configuration outputs the private IP address of the instance.
9
+
10
+
### Using this example
11
+
* Update env-var with the required information. Most examples use the same set of environment variables so you only need to do this once.
12
+
* Source env-var -
13
+
*`$ . env-var`
14
+
* Update `variables.tf` with your launch options and bastion host IP.
15
+
16
+
### Files in the configuration
17
+
18
+
#### `env-vars`
19
+
Is used to export the environmental variables used in the configuration. These are usually authentication related, be sure to exclude this file from your version control system. It's typical to keep this file outside of the configuration.
20
+
21
+
Before you plan, apply, or destroy the configuration source the file -
22
+
`$ . env-vars`
23
+
24
+
#### `DBSystem.tf`
25
+
Defines the Database System
26
+
27
+
#### `remote-exec.tf`
28
+
Uses a `null_resource`, `file`, `remote-exec` and `depends_on` to execute a script on the instance. [More information on the remote-exec provisioner.](https://www.terraform.io/docs/provisioners/remote-exec.html)
29
+
30
+
#### `./scripts/bootstrap.sh`
31
+
A script that gets scp'ed onto the instance then executed.
32
+
33
+
#### `variables.tf`
34
+
Defines the variables used in the configuration
35
+
36
+
#### `datasources.tf`
37
+
Defines the datasources used in the configuration
38
+
39
+
#### `outputs.tf`
40
+
Defines the outputs of the configuration
41
+
42
+
#### `provider.tf`
43
+
Specifies and passes authentication details to the OBMCS TF provider
0 commit comments