Skip to content
This repository was archived by the owner on Oct 31, 2019. It is now read-only.

Commit f5ace72

Browse files
authored
Merge pull request #22 from oracle/jemillan/rename_baremetal_oci
Rename all instances of "baremetal" provider to "oci".
2 parents 6b173ab + b8ddfa2 commit f5ace72

30 files changed

+129
-129
lines changed

README.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[terraform]: https://terraform.io
22
[bmcs]: https://cloud.oracle.com/en_US/bare-metal
3-
[bmcs provider]: https://github.com/oracle/terraform-provider-baremetal/releases
3+
[oci provider]: https://github.com/oracle/terraform-provider-oci/releases
44
[SSH key pair]: https://docs.us-phoenix-1.oraclecloud.com/Content/GSG/Tasks/creatingkeys.htm
55
[API signing]: https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm
66
[Kubectl]: https://kubernetes.io/docs/tasks/tools/install-kubectl/
@@ -41,11 +41,11 @@ configuration, the modules can be used to form your own customized configuration
4141
## Prerequisites
4242

4343
1. Download and install [Terraform][terraform]
44-
2. Download and install the [OCI Terraform Provider][bmcs provider] (recommended version: v1.0.18)
44+
2. Download and install the [OCI Terraform Provider][oci provider] (v2.0.0 or later)
4545
3. Create an Terraform configuration file at `~/.terraformrc` that specifies the path to the OCI provider:
4646
```
47-
providers {
48-
baremetal = "<path_to_provider_binary>/terraform-provider-baremetal"
47+
providers {
48+
oci = "<path_to_provider_binary>/terraform-provider-oci"
4949
}
5050
```
5151
4. Create a _terraform.tfvars_ file in the project root that specifies your [API signature](API signing), tenancy, user, and compartment within OCI:
@@ -61,7 +61,7 @@ $ cp terraform.example.tfvars terraform.tfvars
6161
To run the Terraform scripts, you'll first need to download and install the Terraform binary and [OCI Provider][bmcs provider] as well as OCI access. Check out the [prerequisites](README.md#prerequisites) section for more details.
6262

6363
The quickest way to get a Kubernetes cluster up and running on OCI is to simply use the base configuration defined in
64-
the top-level file `k8s-baremetal.tf`:
64+
the top-level file `k8s-oci.tf`:
6565

6666
```bash
6767
# initialize your Terraform configuration including the modules
@@ -304,10 +304,10 @@ We can use `terraform taint` to worker instances in a particular AD as "tainted"
304304

305305
```bash
306306
# taint all workers in AD1
307-
terraform taint -module=instances-k8sworker-ad1 baremetal_core_instance.TFInstanceK8sWorker
307+
terraform taint -module=instances-k8sworker-ad1 oci_core_instance.TFInstanceK8sWorker
308308
# optionally taint workers in AD2 and AD3 or do so in a subsequent apply
309-
# terraform taint -module=instances-k8sworker-ad2 baremetal_core_instance.TFInstanceK8sWorker
310-
# terraform taint -module=instances-k8sworker-ad3 baremetal_core_instance.TFInstanceK8sWorker
309+
# terraform taint -module=instances-k8sworker-ad2 oci_core_instance.TFInstanceK8sWorker
310+
# terraform taint -module=instances-k8sworker-ad3 oci_core_instance.TFInstanceK8sWorker
311311

312312
# preview changes
313313
$ terraform plan
@@ -324,10 +324,10 @@ We can also use `terraform taint` to master instances in a particular AD as "tai
324324

325325
```bash
326326
# taint all masters in AD1
327-
terraform taint -module=instances-k8smaster-ad1 baremetal_core_instance.TFInstanceK8sMaster
327+
terraform taint -module=instances-k8smaster-ad1 oci_core_instance.TFInstanceK8sMaster
328328
# optionally taint masters in AD2 and AD3 or do so in a subsequent apply
329-
# terraform taint -module=instances-k8smaster-ad2 baremetal_core_instance.TFInstanceK8sMaster
330-
# terraform taint -module=instances-k8smaster-ad3 baremetal_core_instance.TFInstanceK8sMaster
329+
# terraform taint -module=instances-k8smaster-ad2 oci_core_instance.TFInstanceK8sMaster
330+
# terraform taint -module=instances-k8smaster-ad3 oci_core_instance.TFInstanceK8sMaster
331331

332332
# preview changes
333333
$ terraform plan

datasources.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
data "baremetal_identity_availability_domains" "ADs" {
1+
data "oci_identity_availability_domains" "ADs" {
22
compartment_id = "${var.tenancy_ocid}"
33
}
44

instances/etcd/datasources.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Cloud call to get the OCID of the OS image to use
2-
data "baremetal_core_images" "ImageOCID" {
2+
data "oci_core_images" "ImageOCID" {
33
compartment_id = "${var.compartment_ocid}"
44
operating_system = "Canonical Ubuntu"
55
operating_system_version = "${var.instance_os_ver}"
66
}
77

88
# Cloud call to get a list of Availability Domains
9-
data "baremetal_identity_availability_domains" "ADs" {
9+
data "oci_identity_availability_domains" "ADs" {
1010
compartment_id = "${var.tenancy_ocid}"
1111
}
1212

instances/etcd/main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
* The instances/etcd module provisions and configures one or more etcd instances.
33
*/
44

5-
resource "baremetal_core_instance" "TFInstanceEtcd" {
5+
resource "oci_core_instance" "TFInstanceEtcd" {
66
count = "${var.count}"
77
availability_domain = "${var.availability_domain}"
88
compartment_id = "${var.compartment_ocid}"
99
display_name = "${var.label_prefix}${var.display_name}-${count.index}"
1010
hostname_label = "${var.hostname_label}-${count.index}"
11-
image = "${lookup(data.baremetal_core_images.ImageOCID.images[0], "id")}"
11+
image = "${lookup(data.oci_core_images.ImageOCID.images[0], "id")}"
1212
shape = "${var.shape}"
1313
subnet_id = "${var.subnet_id}"
1414

instances/etcd/outputs.tf

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Output the private and public IPs of the instance
22

33
output "ids" {
4-
value = ["${baremetal_core_instance.TFInstanceEtcd.*.id}"]
4+
value = ["${oci_core_instance.TFInstanceEtcd.*.id}"]
55
}
66

77
output "hostname_label" {
8-
value = "${baremetal_core_instance.TFInstanceEtcd.hostname_label}"
8+
value = "${oci_core_instance.TFInstanceEtcd.hostname_label}"
99
}
1010

1111
output "private_ips" {
12-
value = ["${baremetal_core_instance.TFInstanceEtcd.*.private_ip}"]
12+
value = ["${oci_core_instance.TFInstanceEtcd.*.private_ip}"]
1313
}
1414

1515
output "instance_public_ips" {
16-
value = ["${baremetal_core_instance.TFInstanceEtcd.*.public_ip}"]
16+
value = ["${oci_core_instance.TFInstanceEtcd.*.public_ip}"]
1717
}

instances/k8smaster/datasources.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Gets the OCID of the OS image to use
2-
data "baremetal_core_images" "ImageOCID" {
2+
data "oci_core_images" "ImageOCID" {
33
compartment_id = "${var.compartment_ocid}"
44
operating_system = "Canonical Ubuntu"
55
operating_system_version = "${var.instance_os_ver}"
66
}
77

88
# Cloud call to get a list of Availability Domains
9-
data "baremetal_identity_availability_domains" "ADs" {
9+
data "oci_identity_availability_domains" "ADs" {
1010
compartment_id = "${var.tenancy_ocid}"
1111
}
1212

instances/k8smaster/main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
* The instances/k8smaster module provisions and configures one or more Kubernetes Master instances.
33
*/
44

5-
resource "baremetal_core_instance" "TFInstanceK8sMaster" {
5+
resource "oci_core_instance" "TFInstanceK8sMaster" {
66
count = "${var.count}"
77
availability_domain = "${var.availability_domain}"
88
compartment_id = "${var.compartment_ocid}"
99
display_name = "${var.label_prefix}${var.display_name_prefix}-${count.index}"
1010
hostname_label = "${var.hostname_label_prefix}-${count.index}"
11-
image = "${lookup(data.baremetal_core_images.ImageOCID.images[0], "id")}"
11+
image = "${lookup(data.oci_core_images.ImageOCID.images[0], "id")}"
1212
shape = "${var.shape}"
1313
subnet_id = "${var.subnet_id}"
1414

instances/k8smaster/outputs.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
output "ids" {
2-
value = ["${baremetal_core_instance.TFInstanceK8sMaster.*.id}"]
2+
value = ["${oci_core_instance.TFInstanceK8sMaster.*.id}"]
33
}
44

55
output "private_ips" {
6-
value = ["${baremetal_core_instance.TFInstanceK8sMaster.*.private_ip}"]
6+
value = ["${oci_core_instance.TFInstanceK8sMaster.*.private_ip}"]
77
}
88

99
output "public_ips" {
10-
value = ["${baremetal_core_instance.TFInstanceK8sMaster.*.public_ip}"]
10+
value = ["${oci_core_instance.TFInstanceK8sMaster.*.public_ip}"]
1111
}

instances/k8sworker/datasources.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Gets the OCID of the OS image to use
2-
data "baremetal_core_images" "ImageOCID" {
2+
data "oci_core_images" "ImageOCID" {
33
compartment_id = "${var.compartment_ocid}"
44
operating_system = "Canonical Ubuntu"
55
operating_system_version = "${var.instance_os_ver}"
66
}
77

88
# Cloud call to get a list of Availability Domains
9-
data "baremetal_identity_availability_domains" "ADs" {
9+
data "oci_identity_availability_domains" "ADs" {
1010
compartment_id = "${var.tenancy_ocid}"
1111
}
1212

instances/k8sworker/main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
* The instances/k8sworker module provisions and configures one or more Kubernetes Worker instances.
33
*/
44

5-
resource "baremetal_core_instance" "TFInstanceK8sWorker" {
5+
resource "oci_core_instance" "TFInstanceK8sWorker" {
66
count = "${var.count}"
77
availability_domain = "${var.availability_domain}"
88
compartment_id = "${var.compartment_ocid}"
99
display_name = "${var.label_prefix}${var.display_name_prefix}-${count.index}"
1010
hostname_label = "${var.hostname_label_prefix}-${count.index}"
11-
image = "${lookup(data.baremetal_core_images.ImageOCID.images[0], "id")}"
11+
image = "${lookup(data.oci_core_images.ImageOCID.images[0], "id")}"
1212
shape = "${var.shape}"
1313
subnet_id = "${var.subnet_id}"
1414

instances/k8sworker/output.tf

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
output "ids" {
2-
value = ["${baremetal_core_instance.TFInstanceK8sWorker.*.id}"]
2+
value = ["${oci_core_instance.TFInstanceK8sWorker.*.id}"]
33
}
44

55
output "private_ips" {
6-
value = ["${baremetal_core_instance.TFInstanceK8sWorker.*.private_ip}"]
6+
value = ["${oci_core_instance.TFInstanceK8sWorker.*.private_ip}"]
77
}
88

99
output "public_ips" {
10-
value = ["${baremetal_core_instance.TFInstanceK8sWorker.*.public_ip}"]
10+
value = ["${oci_core_instance.TFInstanceK8sWorker.*.public_ip}"]
1111
}
1212

1313
output "instance_host_names" {
14-
value = ["${baremetal_core_instance.TFInstanceK8sWorker.*.display_name}"]
14+
value = ["${oci_core_instance.TFInstanceK8sWorker.*.display_name}"]
1515
}

0 commit comments

Comments
 (0)