Skip to content

Commit 0de1dff

Browse files
committed
Merge in oracle master
2 parents 43e4195 + 10c189a commit 0de1dff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+301
-126
lines changed

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ test_acceptance:
2828
build:
2929
go build -o terraform-provider-baremetal
3030

31-
cross: test_acceptance
31+
version:
32+
sed -i '' -e 's/version = ".*"/version = "\
33+
$(shell curl -s https://api.github.com/repos/oracle/terraform-provider-baremetal/releases/latest | \
34+
jq -r '.tag_name')\
35+
"/g' version.go
36+
37+
release: version test_acceptance
3238
gox -output "./bin/{{.OS}}_{{.Arch}}/terraform-provider-baremetal"
3339

3440
zip:
@@ -39,4 +45,4 @@ zip:
3945
&& tar -czvf linux.tar.gz linux_386 linux_amd64 linux_arm \
4046
&& tar -czvf openbsd.tar.gz openbsd_386 openbsd_amd64
4147

42-
.PHONY: clean fmt build cross test test_unit zip
48+
.PHONY: clean fmt build release test test_unit zip version

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ Edit it to include the OCID of the compartment you want to create the VCN. Remem
8181

8282
You should always plan, then apply a configuration -
8383
```
84-
$ terraform plan ./simple_vcn
84+
$ terraform plan ./single_instance
8585
# Make sure the plan looks right.
86-
$ terraform apply ./simple_vcn
86+
$ terraform apply ./single_instance
8787
```
8888
## OBMC resource and datasource details
8989
https://github.com/oracle/terraform-provider-baremetal/tree/master/docs

crud/helpers.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,17 @@
33
package crud
44

55
import (
6+
"errors"
67
"log"
78
"reflect"
9+
"strconv"
810
"strings"
911
"time"
1012

13+
"github.com/MustWin/baremetal-sdk-go"
1114
"github.com/hashicorp/terraform/helper/resource"
1215
"github.com/hashicorp/terraform/helper/schema"
13-
1416
"github.com/oracle/terraform-provider-baremetal/client"
15-
"github.com/MustWin/baremetal-sdk-go"
16-
"errors"
17-
"strconv"
1817
)
1918

2019
var (
@@ -71,9 +70,10 @@ func handleMissingResourceError(sync ResourceVoider, err *error) {
7170

7271
if err != nil {
7372
if strings.Contains((*err).Error(), "does not exist") ||
74-
strings.Contains((*err).Error(), " not present in ") ||
75-
strings.Contains((*err).Error(), "resource not found") ||
76-
(strings.Contains((*err).Error(), "Load balancer") && strings.Contains((*err).Error(), " has no ")) {
73+
strings.Contains((*err).Error(), " not present in ") ||
74+
strings.Contains((*err).Error(), "resource not found") ||
75+
(strings.Contains((*err).Error(), "Load balancer") && strings.Contains((*err).Error(), " has no ")) {
76+
7777
log.Println("[DEBUG] Object does not exist, voiding resource and nullifying error")
7878
sync.VoidState()
7979
*err = nil

docs/examples/DBsystems/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
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.
99

1010
### 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`
11+
* Update env-vars with the required information. Most examples use the same set of environment variables so you only need to do this once.
12+
* Source env-vars -
13+
* `$ . env-vars`
1414
* Update `variables.tf` with your launch options and bastion host IP.
1515

1616
### Files in the configuration

docs/examples/clusters/Mongodb/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ This configuration generally implements this - [https://community.oracle.com/com
1010
It creates a VNC with a route table, Internet Gateway, Security Lists, a bastion subnet and 2 private subnets for the MongoDB instances.
1111

1212
### Using this example
13-
* Update env-var with the required information. Most examples use the same set of environment variables so you only need to do this once.
14-
* Source env-var
15-
* `$ . env-var`
13+
* Update env-vars with the required information. Most examples use the same set of environment variables so you only need to do this once.
14+
* Source env-vars
15+
* `$ . env-vars`
1616
* Update `variables.tf` with your instance options.
1717

1818
### Files in the configuration

docs/examples/compute/single-instance/README.md renamed to docs/examples/compute/single_instance/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
This example launches an instance into an existing subnet, includes a user-data script in the instance launch, remote executes a command, and outputs the public and private IP address of the instance.
99

1010
### 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`
11+
* Update env-vars with the required information. Most examples use the same set of environment variables so you only need to do this once.
12+
* Source env-vars
13+
* `$ . env-vars`
1414
* Update `variables.tf` with your instance options.
1515

1616
### Files in the configuration

0 commit comments

Comments
 (0)