Skip to content
This repository was archived by the owner on Mar 3, 2022. It is now read-only.

Commit 95a82eb

Browse files
committed
Add copyright header to opc and oraclepaas examples
1 parent 4736ee9 commit 95a82eb

File tree

57 files changed

+232
-117
lines changed

Some content is hidden

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

57 files changed

+232
-117
lines changed

examples/opc/bastion-host-provisioning/main.tf

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
2+
13
variable "user" {}
24
variable "password" {}
35
variable "domain" {}
@@ -23,9 +25,9 @@ resource "opc_compute_ssh_key" "instance" {
2325
}
2426

2527
module "bastion-host" {
26-
source = "modules/bastion"
27-
ssh_public_key = "${opc_compute_ssh_key.bastion.name}"
28-
ssh_private_key = "${file("./bastion_id_rsa")}"
28+
source = "modules/bastion"
29+
ssh_public_key = "${opc_compute_ssh_key.bastion.name}"
30+
ssh_private_key = "${file("./bastion_id_rsa")}"
2931
private_ip_network = "${opc_compute_ip_network.private-ip-network.name}"
3032
}
3133

@@ -36,11 +38,11 @@ resource "opc_compute_ip_network" "private-ip-network" {
3638
}
3739

3840
resource "opc_compute_instance" "private-instance" {
39-
name = "private1"
40-
hostname = "private1"
41-
shape = "oc3"
42-
image_list = "/oracle/public/OL_7.2_UEKR4_x86_64"
43-
ssh_keys = [ "${opc_compute_ssh_key.instance.name}" ]
41+
name = "private1"
42+
hostname = "private1"
43+
shape = "oc3"
44+
image_list = "/oracle/public/OL_7.2_UEKR4_x86_64"
45+
ssh_keys = ["${opc_compute_ssh_key.instance.name}"]
4446

4547
networking_info {
4648
index = 0
@@ -61,7 +63,7 @@ resource "opc_compute_instance" "private-instance" {
6163

6264
provisioner "remote-exec" {
6365
inline = [
64-
"echo 'This instance was provisioned by Terraform.' | sudo tee /etc/motd"
66+
"echo 'This instance was provisioned by Terraform.' | sudo tee /etc/motd",
6567
]
6668
}
6769
}

examples/opc/bastion-host-provisioning/modules/bastion/bastion.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
resource "opc_compute_security_list" "bastion" {
1+
// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
2+
3+
esource "opc_compute_security_list" "bastion" {
24
name = "bastion"
35
policy = "DENY"
46
outbound_cidr_policy = "PERMIT"
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1+
// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
2+
13
output "bastion_public_ip" {
24
description = "Bastion host Public IP address"
3-
value = "${opc_compute_ip_reservation.bastion.ip}"
5+
value = "${opc_compute_ip_reservation.bastion.ip}"
46
}
57

68
output "bastion_public_key" {
79
description = "Bastion ssh key resource"
8-
value = "${var.ssh_public_key}"
10+
value = "${var.ssh_public_key}"
911
}
1012

1113
output "bastion_private_key" {
1214
description = "Bastion private ssh key"
13-
value = "${var.ssh_private_key}"
15+
value = "${var.ssh_private_key}"
1416
}
1517

1618
output "bastion_user" {
1719
description = "Bastion user"
18-
value = "${var.ssh_user}"
20+
value = "${var.ssh_user}"
1921
}

examples/opc/bastion-host-provisioning/modules/bastion/variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
2+
13
variable "ssh_public_key" {
24
description = "(Required) Name of existing SSH Key resource"
35
}

examples/opc/instance-from-colocated-snapshot/main.tf

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2+
13
provider "opc" {
24
user = "${var.user}"
35
password = "${var.password}"
@@ -10,11 +12,11 @@ data "opc_compute_storage_volume_snapshot" "snapshot1" {
1012
}
1113

1214
resource "opc_compute_storage_volume" "volume1" {
13-
name = "volume-from-storage-snapshot"
14-
snapshot = "/Compute-${var.domain}/${var.user}/${data.opc_compute_storage_volume_snapshot.snapshot1.name}"
15-
size = "${data.opc_compute_storage_volume_snapshot.snapshot1.size}"
16-
storage_type = "/oracle/public/storage/default"
17-
bootable = "${data.opc_compute_storage_volume_snapshot.snapshot1.parent_volume_bootable}"
15+
name = "volume-from-storage-snapshot"
16+
snapshot = "/Compute-${var.domain}/${var.user}/${data.opc_compute_storage_volume_snapshot.snapshot1.name}"
17+
size = "${data.opc_compute_storage_volume_snapshot.snapshot1.size}"
18+
storage_type = "/oracle/public/storage/default"
19+
bootable = "${data.opc_compute_storage_volume_snapshot.snapshot1.parent_volume_bootable}"
1820
}
1921

2022
resource "opc_compute_instance" "instance1" {

examples/opc/instance-from-colocated-snapshot/variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2+
13
variable user {}
24
variable password {}
35
variable domain {}

examples/opc/instance-from-storage-snapshot/main.tf

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2+
13
provider "opc" {
24
user = "${var.user}"
35
password = "${var.password}"
@@ -10,10 +12,10 @@ data "opc_compute_storage_volume_snapshot" "snapshot1" {
1012
}
1113

1214
resource "opc_compute_storage_volume" "volume1" {
13-
name = "volume-from-storage-snapshot"
14-
snapshot_id = "${data.opc_compute_storage_volume_snapshot.snapshot1.snapshot_id}"
15-
size = "${data.opc_compute_storage_volume_snapshot.snapshot1.size}"
16-
bootable = true
15+
name = "volume-from-storage-snapshot"
16+
snapshot_id = "${data.opc_compute_storage_volume_snapshot.snapshot1.snapshot_id}"
17+
size = "${data.opc_compute_storage_volume_snapshot.snapshot1.size}"
18+
bootable = true
1719
}
1820

1921
resource "opc_compute_instance" "instance1" {

examples/opc/instance-from-storage-snapshot/variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2+
13
variable user {}
24
variable password {}
35
variable domain {}

examples/opc/instance-with-persistent-boot-volume/main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
2+
13
provider "opc" {
24
user = "${var.user}"
35
password = "${var.password}"

examples/opc/instance-with-persistent-boot-volume/variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
2+
13
variable user {}
24
variable password {}
35
variable domain {}

0 commit comments

Comments
 (0)