diff --git a/builtin/bins/provider-opc/main.go b/builtin/bins/provider-opc/main.go deleted file mode 100644 index 814a0b732..000000000 --- a/builtin/bins/provider-opc/main.go +++ /dev/null @@ -1,12 +0,0 @@ -package main - -import ( - "github.com/hashicorp/terraform/builtin/providers/opc" - "github.com/hashicorp/terraform/plugin" -) - -func main() { - plugin.Serve(&plugin.ServeOpts{ - ProviderFunc: opc.Provider, - }) -} diff --git a/builtin/providers/opc/data_source_network_interface_test.go b/builtin/providers/opc/data_source_network_interface_test.go deleted file mode 100644 index 7cf65e491..000000000 --- a/builtin/providers/opc/data_source_network_interface_test.go +++ /dev/null @@ -1,101 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCDataSourceNetworkInterface_basic(t *testing.T) { - rInt := acctest.RandInt() - resName := "data.opc_compute_network_interface.test" - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - Steps: []resource.TestStep{ - { - Config: testAccDataSourceNetworkInterfaceBasic(rInt), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(resName, "ip_network", fmt.Sprintf("testing-ip-network-%d", rInt)), - resource.TestCheckResourceAttr(resName, "vnic", fmt.Sprintf("ip-network-test-%d", rInt)), - resource.TestCheckResourceAttr(resName, "shared_network", "false"), - ), - }, - }, - }) -} - -func TestAccOPCDataSourceNetworkInterface_sharedNetwork(t *testing.T) { - rInt := acctest.RandInt() - resName := "data.opc_compute_network_interface.test" - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - Steps: []resource.TestStep{ - { - Config: testAccDataSourceNetworkInterfaceShared(rInt), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr(resName, "nat.#", "1"), - resource.TestCheckResourceAttr(resName, "shared_network", "true"), - resource.TestCheckResourceAttr(resName, "sec_lists.#", "1"), - resource.TestCheckResourceAttr(resName, "name_servers.#", "0"), - resource.TestCheckResourceAttr(resName, "vnic_sets.#", "0"), - ), - }, - }, - }) -} - -func testAccDataSourceNetworkInterfaceBasic(rInt int) string { - return fmt.Sprintf(` -resource "opc_compute_ip_network" "foo" { - name = "testing-ip-network-%d" - description = "testing-ip-network-instance" - ip_address_prefix = "10.1.12.0/24" -} - -resource "opc_compute_instance" "test" { - name = "test-%d" - label = "test" - shape = "oc3" - image_list = "/oracle/public/oel_6.7_apaas_16.4.5_1610211300" - networking_info { - index = 0 - ip_network = "${opc_compute_ip_network.foo.id}" - vnic = "ip-network-test-%d" - shared_network = false - } -} - -data "opc_compute_network_interface" "test" { - instance_name = "${opc_compute_instance.test.name}" - instance_id = "${opc_compute_instance.test.id}" - interface = "eth0" -}`, rInt, rInt, rInt) -} - -func testAccDataSourceNetworkInterfaceShared(rInt int) string { - return fmt.Sprintf(` -resource "opc_compute_instance" "test" { - name = "test-%d" - label = "test" - shape = "oc3" - image_list = "/oracle/public/oel_6.7_apaas_16.4.5_1610211300" - tags = ["tag1", "tag2"] - networking_info { - index = 0 - nat = ["ippool:/oracle/public/ippool"] - shared_network = true - } -} - -data "opc_compute_network_interface" "test" { - instance_name = "${opc_compute_instance.test.name}" - instance_id = "${opc_compute_instance.test.id}" - interface = "eth0" -}`, rInt) -} diff --git a/builtin/providers/opc/data_source_virtual_nic_test.go b/builtin/providers/opc/data_source_virtual_nic_test.go deleted file mode 100644 index eacf1bf82..000000000 --- a/builtin/providers/opc/data_source_virtual_nic_test.go +++ /dev/null @@ -1,62 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCVNIC_Basic(t *testing.T) { - rInt := acctest.RandInt() - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - Steps: []resource.TestStep{ - { - Config: testAccVnicBasic(rInt), - Check: resource.ComposeTestCheckFunc( - resource.TestCheckResourceAttr( - "data.opc_compute_vnic.foo", "mac_address", "02:5a:cd:ec:2e:4c"), - resource.TestCheckResourceAttr( - "data.opc_compute_vnic.foo", "transit_flag", "false"), - ), - }, - }, - }) -} - -func testAccVnicBasic(rInt int) string { - return fmt.Sprintf(` -resource "opc_compute_ip_network" "foo" { - name = "testing-vnic-data-%d" - description = "testing-vnic-data" - ip_address_prefix = "10.1.13.0/24" -} - -resource "opc_compute_instance" "test" { - name = "test-%d" - label = "test" - shape = "oc3" - image_list = "/oracle/public/oel_6.7_apaas_16.4.5_1610211300" - networking_info { - index = 0 - ip_network = "${opc_compute_ip_network.foo.id}" - vnic = "test-vnic-data-%d" - shared_network = false - mac_address = "02:5a:cd:ec:2e:4c" - } -} - -data "opc_compute_network_interface" "eth0" { - instance_name = "${opc_compute_instance.test.name}" - instance_id = "${opc_compute_instance.test.id}" - interface = "eth0" -} - -data "opc_compute_vnic" "foo" { - name = "${data.opc_compute_network_interface.eth0.vnic}" -}`, rInt, rInt, rInt) -} diff --git a/builtin/providers/opc/import_acl_test.go b/builtin/providers/opc/import_acl_test.go deleted file mode 100644 index 16b49fa93..000000000 --- a/builtin/providers/opc/import_acl_test.go +++ /dev/null @@ -1,58 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCACL_importBasic(t *testing.T) { - resourceName := "opc_compute_acl.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccACLBasic, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckACLDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} -func TestAccOPCACL_importDisabled(t *testing.T) { - resourceName := "opc_compute_acl.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccACLDisabled, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckACLDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_image_list_test.go b/builtin/providers/opc/import_image_list_test.go deleted file mode 100644 index 19877f95a..000000000 --- a/builtin/providers/opc/import_image_list_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCImageList_importBasic(t *testing.T) { - resourceName := "opc_compute_image_list.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccImageList_basic, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckImageListDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCImageList_importComplete(t *testing.T) { - resourceName := "opc_compute_image_list.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccImageList_complete, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckImageListDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_instance_test.go b/builtin/providers/opc/import_instance_test.go deleted file mode 100644 index f31654443..000000000 --- a/builtin/providers/opc/import_instance_test.go +++ /dev/null @@ -1,36 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCInstance_importBasic(t *testing.T) { - rInt := acctest.RandInt() - - resourceName := "opc_compute_instance.test" - instanceName := fmt.Sprintf("acc-test-instance-%d", rInt) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccOPCCheckInstanceDestroy, - Steps: []resource.TestStep{ - { - Config: testAccInstanceBasic(rInt), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - ImportStateIdPrefix: instanceName + "/", - ImportStateVerifyIgnore: []string{"instance_attributes"}, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_ip_address_association_test.go b/builtin/providers/opc/import_ip_address_association_test.go deleted file mode 100644 index a68f6daf8..000000000 --- a/builtin/providers/opc/import_ip_address_association_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package opc - -import ( - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCIPAddressAssociation_importBasic(t *testing.T) { - resourceName := "opc_compute_ip_address_association.test" - - ri := acctest.RandInt() - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckIPAddressAssociationDestroy, - Steps: []resource.TestStep{ - { - Config: testAccIPAddressAssociationBasic(ri), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_ip_address_prefix_set_test.go b/builtin/providers/opc/import_ip_address_prefix_set_test.go deleted file mode 100644 index 09c53d845..000000000 --- a/builtin/providers/opc/import_ip_address_prefix_set_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package opc - -import ( - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCIPAddressPrefixSet_importBasic(t *testing.T) { - resourceName := "opc_compute_ip_address_prefix_set.test" - - ri := acctest.RandInt() - config := testAccIPAddressPrefixSetBasic(ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckIPAddressPrefixSetDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_ip_address_reservation_test.go b/builtin/providers/opc/import_ip_address_reservation_test.go deleted file mode 100644 index bc67afa16..000000000 --- a/builtin/providers/opc/import_ip_address_reservation_test.go +++ /dev/null @@ -1,57 +0,0 @@ -package opc - -import ( - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCIPAddressReservation_importBasic(t *testing.T) { - resourceName := "opc_compute_ip_address_reservation.test" - - ri := acctest.RandInt() - config := testAccOPCIPAddressReservationConfig_Basic(ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccOPCCheckIPAddressReservationDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} -func TestAccOPCIPAddressReservation_importDisabled(t *testing.T) { - resourceName := "opc_compute_ip_address_reservation.test" - - ri := acctest.RandInt() - config := testAccOPCIPAddressReservationConfig_Basic(ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccOPCCheckIPAddressReservationDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_ip_association_test.go b/builtin/providers/opc/import_ip_association_test.go deleted file mode 100644 index cd1be015c..000000000 --- a/builtin/providers/opc/import_ip_association_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCIPAssociation_importBasic(t *testing.T) { - resourceName := "opc_compute_ip_association.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccIPAssociationBasic, ri, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccOPCCheckIPAssociationDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_ip_network_exchange_test.go b/builtin/providers/opc/import_ip_network_exchange_test.go deleted file mode 100644 index c3abcb65e..000000000 --- a/builtin/providers/opc/import_ip_network_exchange_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCIPNetworkExchange_importBasic(t *testing.T) { - resourceName := "opc_compute_ip_network_exchange.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccIPNetworkExchangeBasic, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckIPNetworkExchangeDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_ip_network_test.go b/builtin/providers/opc/import_ip_network_test.go deleted file mode 100644 index 6311e98d4..000000000 --- a/builtin/providers/opc/import_ip_network_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package opc - -import ( - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCIPNetwork_importBasic(t *testing.T) { - resourceName := "opc_compute_ip_network.test" - - rInt := acctest.RandInt() - config := testAccOPCIPNetworkConfig_Basic(rInt) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: opcResourceCheck(resourceName, testAccOPCCheckIPNetworkDestroyed), - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_ip_reservation_test.go b/builtin/providers/opc/import_ip_reservation_test.go deleted file mode 100644 index 045bfcf16..000000000 --- a/builtin/providers/opc/import_ip_reservation_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCIPReservation_importBasic(t *testing.T) { - resourceName := "opc_compute_ip_reservation.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccIPReservationBasic, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckIPReservationDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_route_test.go b/builtin/providers/opc/import_route_test.go deleted file mode 100644 index 8302c85ae..000000000 --- a/builtin/providers/opc/import_route_test.go +++ /dev/null @@ -1,33 +0,0 @@ -package opc - -import ( - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCRoute_importBasic(t *testing.T) { - resourceName := "opc_compute_route.test" - - ri := acctest.RandInt() - config := testAccOPCRouteConfig_Basic(ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccOPCCheckRouteDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_sec_rule_test.go b/builtin/providers/opc/import_sec_rule_test.go deleted file mode 100644 index 1db5b6b16..000000000 --- a/builtin/providers/opc/import_sec_rule_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCSecRule_importBasic(t *testing.T) { - resourceName := "opc_compute_sec_rule.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccOPCSecRuleBasic, ri, ri, ri, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckSecRuleDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCSecRule_importComplete(t *testing.T) { - resourceName := "opc_compute_sec_rule.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccOPCSecRuleComplete, ri, ri, ri, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckSecRuleDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_security_application_test.go b/builtin/providers/opc/import_security_application_test.go deleted file mode 100644 index 35026c66a..000000000 --- a/builtin/providers/opc/import_security_application_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCSecurityApplication_importICMP(t *testing.T) { - resourceName := "opc_compute_security_application.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccOPCSecurityApplicationICMP, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccOPCCheckSecurityApplicationDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCSecurityApplication_importTCP(t *testing.T) { - resourceName := "opc_compute_security_application.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccOPCSecurityApplicationTCP, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccOPCCheckSecurityApplicationDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_security_association_test.go b/builtin/providers/opc/import_security_association_test.go deleted file mode 100644 index 35c98503f..000000000 --- a/builtin/providers/opc/import_security_association_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCSecurityAssociation_importBasic(t *testing.T) { - resourceName := "opc_compute_security_association.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccSecurityAssociationBasic, ri, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccOPCCheckSecurityAssociationDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCSecurityAssociation_importComplete(t *testing.T) { - resourceName := "opc_compute_security_association.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccSecurityAssociationComplete, ri, ri, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccOPCCheckSecurityAssociationDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_security_ip_list_test.go b/builtin/providers/opc/import_security_ip_list_test.go deleted file mode 100644 index b38c5a464..000000000 --- a/builtin/providers/opc/import_security_ip_list_test.go +++ /dev/null @@ -1,34 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCSecurityIPList_importBasic(t *testing.T) { - resourceName := "opc_compute_security_ip_list.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccOPCSecurityIPListBasic, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckSecurityIPListDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_security_list_test.go b/builtin/providers/opc/import_security_list_test.go deleted file mode 100644 index 0ac0d02d8..000000000 --- a/builtin/providers/opc/import_security_list_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCSecurityList_importBasic(t *testing.T) { - resourceName := "opc_compute_security_list.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccOPCSecurityListBasic, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckSecurityListDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCSecurityList_importComplete(t *testing.T) { - resourceName := "opc_compute_security_list.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccOPCSecurityListComplete, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckSecurityListDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_security_protocol_test.go b/builtin/providers/opc/import_security_protocol_test.go deleted file mode 100644 index 109d5d3fe..000000000 --- a/builtin/providers/opc/import_security_protocol_test.go +++ /dev/null @@ -1,58 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCSecurityProtocol_importBasic(t *testing.T) { - resourceName := "opc_compute_security_protocol.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccOPCSecurityProtocolBasic, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckSecurityProtocolDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} -func TestAccOPCSecurityProtocol_importComplete(t *testing.T) { - resourceName := "opc_compute_security_protocol.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccOPCSecurityProtocolComplete, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckSecurityProtocolDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_security_rule_test.go b/builtin/providers/opc/import_security_rule_test.go deleted file mode 100644 index f3b98249e..000000000 --- a/builtin/providers/opc/import_security_rule_test.go +++ /dev/null @@ -1,58 +0,0 @@ -package opc - -import ( - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCSecurityRule_importBasic(t *testing.T) { - resourceName := "opc_compute_security_rule.test" - - ri := acctest.RandInt() - config := testAccOPCSecurityRuleConfig_Basic(ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckSecurityRuleDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCSecurityRule_importFull(t *testing.T) { - resourceName := "opc_compute_security_rule.test" - - ri := acctest.RandInt() - config := testAccOPCSecurityRuleConfig_Full(ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccCheckSecurityRuleDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_ssh_key_test.go b/builtin/providers/opc/import_ssh_key_test.go deleted file mode 100644 index a52987ed8..000000000 --- a/builtin/providers/opc/import_ssh_key_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCSSHKey_importBasic(t *testing.T) { - resourceName := "opc_compute_ssh_key.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccOPCSSHKeyBasic, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccOPCCheckSSHKeyDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCSSHKey_importDisabled(t *testing.T) { - resourceName := "opc_compute_ssh_key.test" - - ri := acctest.RandInt() - config := fmt.Sprintf(testAccOPCSSHKeyDisabled, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { - testAccPreCheck(t) - }, - Providers: testAccProviders, - CheckDestroy: testAccOPCCheckSSHKeyDestroy, - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_storage_volume_snapshot_test.go b/builtin/providers/opc/import_storage_volume_snapshot_test.go deleted file mode 100644 index 68654c13b..000000000 --- a/builtin/providers/opc/import_storage_volume_snapshot_test.go +++ /dev/null @@ -1,29 +0,0 @@ -package opc - -import ( - "testing" - - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCStorageVolumeSnapshot_importBasic(t *testing.T) { - resourceName := "opc_compute_storage_volume_snapshot.test" - rInt := acctest.RandInt() - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: opcResourceCheck(resourceName, testAccCheckStorageVolumeSnapshotDestroyed), - Steps: []resource.TestStep{ - { - Config: testAccStorageVolumeSnapshot_basic(rInt), - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/import_storage_volume_test.go b/builtin/providers/opc/import_storage_volume_test.go deleted file mode 100644 index f97599fd2..000000000 --- a/builtin/providers/opc/import_storage_volume_test.go +++ /dev/null @@ -1,163 +0,0 @@ -package opc - -import ( - "testing" - - "fmt" - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" -) - -func TestAccOPCStorageVolume_importBasic(t *testing.T) { - resourceName := "opc_compute_storage_volume.test" - rInt := acctest.RandInt() - config := fmt.Sprintf(testAccStorageVolumeBasic, rInt) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: opcResourceCheck(resourceName, testAccCheckStorageVolumeDestroyed), - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCStorageVolume_importComplete(t *testing.T) { - resourceName := "opc_compute_storage_volume.test" - rInt := acctest.RandInt() - config := fmt.Sprintf(testAccStorageVolumeComplete, rInt) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: opcResourceCheck(resourceName, testAccCheckStorageVolumeDestroyed), - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCStorageVolume_importMaxSize(t *testing.T) { - resourceName := "opc_compute_storage_volume.test" - rInt := acctest.RandInt() - config := fmt.Sprintf(testAccStorageVolumeBasicMaxSize, rInt) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: opcResourceCheck(resourceName, testAccCheckStorageVolumeDestroyed), - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCStorageVolume_importBootable(t *testing.T) { - resourceName := "opc_compute_storage_volume.test" - rInt := acctest.RandInt() - config := fmt.Sprintf(testAccStorageVolumeBootable, rInt, rInt) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: opcResourceCheck(resourceName, testAccCheckStorageVolumeDestroyed), - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCStorageVolume_importImageListEntry(t *testing.T) { - resourceName := "opc_compute_storage_volume.test" - rInt := acctest.RandInt() - config := fmt.Sprintf(testAccStorageVolumeImageListEntry, rInt, rInt) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: opcResourceCheck(resourceName, testAccCheckStorageVolumeDestroyed), - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCStorageVolume_importLowLatency(t *testing.T) { - resourceName := "opc_compute_storage_volume.test" - rInt := acctest.RandInt() - config := testAccStorageVolumeLowLatency(rInt) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: opcResourceCheck(resourceName, testAccCheckStorageVolumeDestroyed), - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} - -func TestAccOPCStorageVolume_importFromSnapshot(t *testing.T) { - resourceName := "opc_compute_storage_volume.test" - rInt := acctest.RandInt() - config := testAccStorageVolumeFromSnapshot(rInt) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: opcResourceCheck(resourceName, testAccCheckStorageVolumeDestroyed), - Steps: []resource.TestStep{ - { - Config: config, - }, - { - ResourceName: resourceName, - ImportState: true, - ImportStateVerify: true, - }, - }, - }) -} diff --git a/builtin/providers/opc/provider_test.go b/builtin/providers/opc/provider_test.go deleted file mode 100644 index db6dc8a24..000000000 --- a/builtin/providers/opc/provider_test.go +++ /dev/null @@ -1,62 +0,0 @@ -package opc - -import ( - "fmt" - "os" - "testing" - - "github.com/hashicorp/go-oracle-terraform/compute" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/terraform" -) - -var testAccProviders map[string]terraform.ResourceProvider -var testAccProvider *schema.Provider - -func init() { - testAccProvider = Provider().(*schema.Provider) - testAccProviders = map[string]terraform.ResourceProvider{ - "opc": testAccProvider, - } -} - -func TestProvider(t *testing.T) { - if err := Provider().(*schema.Provider).InternalValidate(); err != nil { - t.Fatalf("Error creating Provider: %s", err) - } -} - -func TestProvider_impl(t *testing.T) { - var _ terraform.ResourceProvider = Provider() -} - -func testAccPreCheck(t *testing.T) { - required := []string{"OPC_USERNAME", "OPC_PASSWORD", "OPC_IDENTITY_DOMAIN", "OPC_ENDPOINT"} - for _, prop := range required { - if os.Getenv(prop) == "" { - t.Fatalf("%s must be set for acceptance test", prop) - } - } -} - -type OPCResourceState struct { - *compute.Client - *terraform.InstanceState -} - -func opcResourceCheck(resourceName string, f func(checker *OPCResourceState) error) resource.TestCheckFunc { - return func(s *terraform.State) error { - rs, ok := s.RootModule().Resources[resourceName] - if !ok { - return fmt.Errorf("Resource not found: %s", resourceName) - } - - state := &OPCResourceState{ - Client: testAccProvider.Meta().(*compute.Client), - InstanceState: rs.Primary, - } - - return f(state) - } -} diff --git a/builtin/providers/opc/resource_acl_test.go b/builtin/providers/opc/resource_acl_test.go deleted file mode 100644 index 9a0293e68..000000000 --- a/builtin/providers/opc/resource_acl_test.go +++ /dev/null @@ -1,107 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/go-oracle-terraform/compute" - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccOPCACL_Basic(t *testing.T) { - ri := acctest.RandInt() - config := fmt.Sprintf(testAccACLBasic, ri) - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckACLDestroy, - Steps: []resource.TestStep{ - { - Config: config, - Check: resource.ComposeTestCheckFunc( - testAccCheckACLExists, - ), - }, - }, - }) -} - -func TestAccOPCACL_Update(t *testing.T) { - ri := acctest.RandInt() - config := fmt.Sprintf(testAccACLBasic, ri) - updatedConfig := fmt.Sprintf(testAccACLDisabled, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckACLDestroy, - Steps: []resource.TestStep{ - { - Config: config, - Check: testAccCheckACLExists, - }, - { - Config: updatedConfig, - Check: resource.ComposeTestCheckFunc( - testAccCheckACLExists, - resource.TestCheckResourceAttr("opc_compute_acl.test", "enabled", "false"), - ), - }, - }, - }) -} - -func testAccCheckACLExists(s *terraform.State) error { - client := testAccProvider.Meta().(*compute.Client).ACLs() - - for _, rs := range s.RootModule().Resources { - if rs.Type != "opc_compute_acl" { - continue - } - - input := compute.GetACLInput{ - Name: rs.Primary.Attributes["name"], - } - if _, err := client.GetACL(&input); err != nil { - return fmt.Errorf("Error retrieving state of ACL %s: %s", input.Name, err) - } - } - - return nil -} - -func testAccCheckACLDestroy(s *terraform.State) error { - client := testAccProvider.Meta().(*compute.Client).ACLs() - - for _, rs := range s.RootModule().Resources { - if rs.Type != "opc_compute_acl" { - continue - } - - input := compute.GetACLInput{ - Name: rs.Primary.Attributes["name"], - } - if info, err := client.GetACL(&input); err == nil { - return fmt.Errorf("ACL %s still exists: %#v", input.Name, info) - } - } - - return nil -} - -var testAccACLBasic = ` -resource "opc_compute_acl" "test" { - name = "test_acl-%d" - description = "test acl" -} -` - -var testAccACLDisabled = ` -resource "opc_compute_acl" "test" { - name = "test_acl-%d" - description = "test acl" - enabled = false -} -` diff --git a/builtin/providers/opc/resource_image_list_entry_test.go b/builtin/providers/opc/resource_image_list_entry_test.go deleted file mode 100644 index a74fa9aec..000000000 --- a/builtin/providers/opc/resource_image_list_entry_test.go +++ /dev/null @@ -1,161 +0,0 @@ -package opc - -import ( - "fmt" - "testing" - - "github.com/hashicorp/go-oracle-terraform/compute" - "github.com/hashicorp/terraform/helper/acctest" - "github.com/hashicorp/terraform/helper/resource" - "github.com/hashicorp/terraform/terraform" -) - -func TestAccOPCImageListEntry_Basic(t *testing.T) { - ri := acctest.RandInt() - config := fmt.Sprintf(testAccImageListEntry_basic, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckImageListEntryDestroy, - Steps: []resource.TestStep{ - { - Config: config, - Check: testAccCheckImageListEntryExists, - }, - }, - }) -} - -func TestAccOPCImageListEntry_Complete(t *testing.T) { - ri := acctest.RandInt() - config := fmt.Sprintf(testAccImageListEntry_Complete, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckImageListEntryDestroy, - Steps: []resource.TestStep{ - { - Config: config, - Check: testAccCheckImageListEntryExists, - }, - }, - }) -} - -func TestAccOPCImageListEntry_CompleteExpanded(t *testing.T) { - ri := acctest.RandInt() - config := fmt.Sprintf(testAccImageListEntry_CompleteExpanded, ri) - - resource.Test(t, resource.TestCase{ - PreCheck: func() { testAccPreCheck(t) }, - Providers: testAccProviders, - CheckDestroy: testAccCheckImageListEntryDestroy, - Steps: []resource.TestStep{ - { - Config: config, - Check: testAccCheckImageListEntryExists, - }, - }, - }) -} - -func testAccCheckImageListEntryExists(s *terraform.State) error { - client := testAccProvider.Meta().(*compute.Client).ImageListEntries() - - for _, rs := range s.RootModule().Resources { - if rs.Type != "opc_compute_image_list_entry" { - continue - } - - name, version, err := parseOPCImageListEntryID(rs.Primary.ID) - if err != nil { - return fmt.Errorf("Error parsing the Image List ID: '%s': %+v", rs.Primary.ID, err) - } - - input := compute.GetImageListEntryInput{ - Name: *name, - Version: *version, - } - - if _, err := client.GetImageListEntry(&input); err != nil { - return fmt.Errorf("Error retrieving state of Image List Entry %s: %s", input.Name, err) - } - } - - return nil -} - -func testAccCheckImageListEntryDestroy(s *terraform.State) error { - client := testAccProvider.Meta().(*compute.Client).ImageListEntries() - - for _, rs := range s.RootModule().Resources { - if rs.Type != "opc_compute_image_list_entry" { - continue - } - - name, version, err := parseOPCImageListEntryID(rs.Primary.ID) - if err != nil { - return fmt.Errorf("Error parsing the Image List ID: %+v", err) - } - - input := compute.GetImageListEntryInput{ - Name: *name, - Version: *version, - } - if info, err := client.GetImageListEntry(&input); err == nil { - return fmt.Errorf("Image List Entry %s still exists: %#v", input.Name, info) - } - } - - return nil -} - -var testAccImageListEntry_basic = ` -resource "opc_compute_image_list" "test" { - name = "test-acc-image-list-entry-basic-%d" - description = "Acceptance Test TestAccOPCImageListEntry_Basic" - default = 1 -} - -resource "opc_compute_image_list_entry" "test" { - name = "${opc_compute_image_list.test.name}" - machine_images = [ "/oracle/public/oel_6.7_apaas_16.4.5_1610211300" ] - version = 1 -} -` - -var testAccImageListEntry_Complete = ` -resource "opc_compute_image_list" "test" { - name = "test-acc-image-list-entry-basic-%d" - description = "Acceptance Test TestAccOPCImageListEntry_Basic" - default = 1 -} - -resource "opc_compute_image_list_entry" "test" { - name = "${opc_compute_image_list.test.name}" - machine_images = [ "/oracle/public/oel_6.7_apaas_16.4.5_1610211300" ] - attributes = "{\"hello\":\"world\"}" - version = 1 -} -` - -var testAccImageListEntry_CompleteExpanded = ` -resource "opc_compute_image_list" "test" { - name = "test-acc-image-list-entry-basic-%d" - description = "Acceptance Test TestAccOPCImageListEntry_Basic" - default = 1 -} - -resource "opc_compute_image_list_entry" "test" { - name = "${opc_compute_image_list.test.name}" - machine_images = [ "/oracle/public/oel_6.7_apaas_16.4.5_1610211300" ] - attributes = < **Caution:** The ``opc_compute_instance`` resource can completely delete your -instance just as easily as it can create it. To avoid costly accidents, -consider setting -[``prevent_destroy``](/docs/configuration/resources.html#prevent_destroy) -on your instance resources as an extra safety measure. - -## Example Usage - -```hcl -resource "opc_compute_ip_network" "test" { - name = "internal-network" - description = "Terraform Provisioned Internal Network" - ip_address_prefix = "10.0.1.0/24" - public_napt_enabled = false -} - -resource "opc_compute_storage_volume" "test" { - name = "internal" - size = 100 -} - -resource "opc_compute_instance" "test" { - name = "instance1" - label = "Terraform Provisioned Instance" - shape = "oc3" - image_list = "/oracle/public/oel_6.7_apaas_16.4.5_1610211300" - - storage { - volume = "${opc_compute_storage_volume.test.name}" - index = 1 - } - - networking_info { - index = 0 - nat = ["ippool:/oracle/public/ippool"] - shared_network = true - } -} - -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the instance. - -* `shape` - (Required) The shape of the instance, e.g. `oc4`. - -* `instance_attributes` - (Optional) A JSON string of custom attributes. See [Attributes](#attributes) below for more information. - -* `boot_order` - (Optional) The index number of the bootable storage volume, presented as a list, that should be used to boot the instance. The only valid value is `[1]`. If you set this attribute, you must also specify a bootable storage volume with index number 1 in the volume sub-parameter of storage_attachments. When you specify boot_order, you don't need to specify the imagelist attribute, because the instance is booted using the image on the specified bootable storage volume. If you specify both boot_order and imagelist, the imagelist attribute is ignored. - -* `hostname` - (Optional) The host name assigned to the instance. On an Oracle Linux instance, this host name is displayed in response to the hostname command. Only relative DNS is supported. The domain name is suffixed to the host name that you specify. The host name must not end with a period. If you don't specify a host name, then a name is generated automatically. - -* `image_list` - (Optional) The imageList of the instance, e.g. `/oracle/public/oel_6.4_2GB_v1`. - -* `label` - (Optional) The label to apply to the instance. - -* `networking_info` - (Optional) Information pertaining to an individual network interface to be created and attached to the instance. See [Networking Info](#networking-info) below for more information. - -* `storage` - (Optional) Information pertaining to an individual storage attachment to be created during instance creation. Please see [Storage Attachments](#storage-attachments) below for more information. - -* `reverse_dns` - (Optional) If set to `true` (default), then reverse DNS records are created. If set to `false`, no reverse DNS records are created. - -* `ssh_keys` - (Optional) A list of the names of the SSH Keys that can be used to log into the instance. - -* `tags` - (Optional) A list of strings that should be supplied to the instance as tags. - -## Attributes - -During instance creation, there are several custom attributes that a user may wish to make available to the instance during instance creation. -These attributes can be specified via the `instance_attributes` field, and must be presented as a string in JSON format. -The easiest way to populate this field is with a HEREDOC: - -```hcl -resource "opc_compute_instance" "foo" { - name = "test" - label = "test" - shape = "oc3" - imageList = "/oracle/public/oel_6.4_2GB_v1" - instance_attributes = </@// -``` - -The instance can be imported as such: - -```shell -$ terraform import opc_compute_instance.instance1 instance_name/instance_id -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_ip_address_association.html.markdown b/website/source/docs/providers/opc/r/opc_compute_ip_address_association.html.markdown deleted file mode 100644 index cffabad6a..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_ip_address_association.html.markdown +++ /dev/null @@ -1,48 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_ip_address_association" -sidebar_current: "docs-opc-resource-ip-address-association" -description: |- - Creates and manages an IP address association in an OPC identity domain, for an IP Network. ---- - -# opc\_compute\_ip\_address\_association - -The ``opc_compute_ip_address_association`` resource creates and manages an IP address association between an IP address reservation and a virtual NIC in an OPC identity domain, for an IP Network. - -## Example Usage - -```hcl -resource "opc_compute_ip_address_association" "default" { - name = "PrefixSet1" - ip_address_reservation = "${opc_compute_ip_address_reservation.default.name}" - vnic = "${data.opc_compute_vnic.default.name}" - tags = ["tags1", "tags2"] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the ip address association. - -* `ip_address_reservation` - (Optional) The name of the NAT IP address reservation. - -* `vnic` - (Optional) The name of the virtual NIC associated with this NAT IP reservation. - -* `description` - (Optional) A description of the ip address association. - -* `tags` - (Optional) List of tags that may be applied to the ip address association. - -In addition to the above, the following variables are exported: - -* `uri` - (Computed) The Uniform Resource Identifier of the ip address association. - -## Import - -IP Address Associations can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_ip_address_association.default example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_ip_address_prefix_set.html.markdown b/website/source/docs/providers/opc/r/opc_compute_ip_address_prefix_set.html.markdown deleted file mode 100644 index fa63f0794..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_ip_address_prefix_set.html.markdown +++ /dev/null @@ -1,45 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_ip_address_prefix_set" -sidebar_current: "docs-opc-resource-ip-address-prefix-set" -description: |- - Creates and manages an IP address prefix set in an OPC identity domain. ---- - -# opc\_compute\_ip\_address\_prefix\_set - -The ``opc_compute_ip_address_prefix_set`` resource creates and manages an IP address prefix set in an OPC identity domain. - -## Example Usage - -```hcl -resource "opc_compute_ip_address_prefix_set" "default" { - name = "PrefixSet1" - prefixes = ["192.168.0.0/16", "172.120.0.0/24"] - tags = ["tags1", "tags2"] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the ip address prefix set. - -* `prefixes` - (Optional) List of CIDR IPv4 prefixes assigned in the virtual network. - -* `description` - (Optional) A description of the ip address prefix set. - -* `tags` - (Optional) List of tags that may be applied to the ip address prefix set. - -In addition to the above, the following variables are exported: - -* `uri` - (Computed) The Uniform Resource Identifier of the ip address prefix set. - -## Import - -IP Address Prefix Set can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_ip_address_prefix_set.default example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_ip_address_reservation.html.markdown b/website/source/docs/providers/opc/r/opc_compute_ip_address_reservation.html.markdown deleted file mode 100644 index d73a67e1a..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_ip_address_reservation.html.markdown +++ /dev/null @@ -1,46 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_ip_address_reservation" -sidebar_current: "docs-opc-resource-ip-address-reservation" -description: |- - Creates and manages an IP address reservation in an OPC identity domain for an IP Network. ---- - -# opc\_compute\_ip\_address\_reservation - -The ``opc_compute_ip_address_reservation`` resource creates and manages an IP address reservation in an OPC identity domain, for an IP Network. - -## Example Usage - -```hcl -resource "opc_compute_ip_address_reservation" "default" { - name = "IPAddressReservation1" - ip_address_pool = "public-ippool" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the ip address reservation. - -* `ip_address_pool` - (Required) The IP address pool from which you want to reserve an IP address. Must be either `public-ippool` or `cloud-ippool`. - -* `description` - (Optional) A description of the ip address reservation. - -* `tags` - (Optional) List of tags that may be applied to the IP address reservation. - -In addition to the above, the following attributes are exported: - -* `ip_address` - Reserved NAT IPv4 address from the IP address pool. - -* `uri` - The Uniform Resource Identifier of the ip address reservation - -## Import - -IP Address Reservations can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_ip_address_reservation.default example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_ip_association.html.markdown b/website/source/docs/providers/opc/r/opc_compute_ip_association.html.markdown deleted file mode 100644 index 8ed8334c6..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_ip_association.html.markdown +++ /dev/null @@ -1,46 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_ip_association" -sidebar_current: "docs-opc-resource-ip-association" -description: |- - Creates and manages an IP association in an OPC identity domain for the Shared Network. ---- - -# opc\_compute\_ip\_association - -The ``opc_compute_ip_association`` resource creates and manages an association between an IP address and an instance in -an OPC identity domain, for the Shared Network. - -## Example Usage - -```hcl -resource "opc_compute_ip_association" "instance1_reservation1" { - vcable = "${opc_compute_instance.test_instance.vcable}" - parentpool = "ipreservation:${opc_compute_ip_reservation.reservation1.name}" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `vcable` - (Required) The vcable of the instance to associate the IP address with. - -* `parentpool` - (Required) The pool from which to take an IP address. To associate a specific reserved IP address, use -the prefix `ipreservation:` followed by the name of the IP reservation. To allocate an IP address from a pool, use the -prefix `ippool:`, e.g. `ippool:/oracle/public/ippool`. - - -## Attributes Reference - -The following attributes are exported: - -* `name` The name of the IP Association - -## Import - -IP Associations can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_ip_association.association1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_ip_network.html.markdown b/website/source/docs/providers/opc/r/opc_compute_ip_network.html.markdown deleted file mode 100644 index 5b843219d..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_ip_network.html.markdown +++ /dev/null @@ -1,62 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_ip_network" -sidebar_current: "docs-opc-resource-ip-network" -description: |- - Creates and manages an IP Network ---- - -# opc\_compute\_ip_network - -The ``opc_compute_ip_network`` resource creates and manages an IP Network. - -## Example Usage - -```hcl -resource "opc_compute_ip_network" "foo" { - name = "my-ip-network" - description = "my IP Network" - ip_address_prefix = "10.0.1.0/24" - ip_network_exchange = "${opc_compute_ip_exchange.foo.name}" - public_napt_enabled = false - tags = ["tag1", "tag2"] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the IP Network. - -* `ip_address_prefix` - (Required) The IPv4 address prefix, in CIDR format. - -* `description` - (Optional) The description of the IP Network. - -* `ip_network_exchange` - (Optional) Specify the IP Network exchange to which the IP Network belongs to. - -* `public_napt_enabled` - (Optional) If true, enable public internet access using NAPT for VNICs without any public IP Reservation. Defaults to `false`. - -## Attributes Reference - -The following attributes are exported: - -* `name` - The name of the IP Network - -* `ip_address_prefix` - The IPv4 address prefix, in CIDR format. - -* `description` - The description of the IP Network. - -* `ip_network_exchange` - The IP Network Exchange for the IP Network - -* `public_napt_enabled` - Whether public internet access using NAPT for VNICs without any public IP Reservation or not. - -* `uri` - Uniform Resource Identifier for the IP Network - -## Import - -IP Networks can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_ip_network.default example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_ip_network_exchange.html.markdown b/website/source/docs/providers/opc/r/opc_compute_ip_network_exchange.html.markdown deleted file mode 100644 index e0ab547b1..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_ip_network_exchange.html.markdown +++ /dev/null @@ -1,37 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_ip_network_exchange" -sidebar_current: "docs-opc-resource-ip-network-exchange" -description: |- - Creates and manages an IP network exchange in an OPC identity domain. ---- - -# opc\_compute\_ip\_network\_exchange - -The ``opc_compute_ip_network_exchange`` resource creates and manages an IP network exchange in an OPC identity domain. - -## Example Usage - -```hcl -resource "opc_compute_ip_network_exchange" "default" { - name = "NetworkExchange1" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the ip network exchange. - -* `description` - (Optional) A description of the ip network exchange. - -* `tags` - (Optional) List of tags that may be applied to the IP network exchange. - -## Import - -IP Network Exchange's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_ip_network_exchange.exchange1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_ip_reservation.html.markdown b/website/source/docs/providers/opc/r/opc_compute_ip_reservation.html.markdown deleted file mode 100644 index b1462261b..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_ip_reservation.html.markdown +++ /dev/null @@ -1,43 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_ip_reservation" -sidebar_current: "docs-opc-resource-ip-reservation" -description: |- - Creates and manages an IP reservation in an OPC identity domain for the Shared Network. ---- - -# opc\_compute\_ip\_reservation - -The ``opc_compute_ip_reservation`` resource creates and manages an IP reservation in an OPC identity domain for the Shared Network. - -## Example Usage - -```hcl -resource "opc_compute_ip_reservation" "reservation1" { - parent_pool = "/oracle/public/ippool" - permanent = true - tags = [ "test" ] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `parent_pool` - (Required) The pool from which to allocate the IP address. - -* `permanent` - (Required) Whether the IP address remains reserved even when it is no longer associated with an instance -(if true), or may be returned to the pool and replaced with a different IP address when an instance is restarted, or -deleted and recreated (if false). - -* `name` - (Optional) Name of the IP Reservation. Will be generated if unspecified. - -* `tags` - (Optional) List of tags that may be applied to the IP reservation. - -## Import - -IP Reservations can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_ip_reservations.reservation1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_route.html.markdown b/website/source/docs/providers/opc/r/opc_compute_route.html.markdown deleted file mode 100644 index ccb3d0dac..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_route.html.markdown +++ /dev/null @@ -1,60 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_route" -sidebar_current: "docs-opc-resource-route" -description: |- - Creates and manages a Route resource for an IP Network ---- - -# opc\_compute\_route - -The ``opc_compute_route`` resource creates and manages a route for an IP Network. - -## Example Usage - -```hcl -resource "opc_compute_route" "foo" { - name = "my-route" - description = "my IP Network route" - admin_distance = 1 - ip_address_prefix = "10.0.1.0/24" - next_hop_vnic_set = "${opc_compute_vnic_set.bar.name}" - tags = ["tag1", "tag2"] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the route. - -* `description` - (Optional) The description of the route. - -* `admin_distance` - (Optional) The route's administrative distance. Defaults to `0`. - -* `ip_address_prefix` - (Required) The IPv4 address prefix, in CIDR format, of the external network from which to route traffic. - -* `next_hop_vnic_set` - (Required) Name of the virtual NIC set to route matching packets to. Routed flows are load-balanced among all the virtual NICs in the virtual NIC set. - -## Attributes Reference - -The following attributes are exported: - -* `name` The name of the route - -* `description` - The description of the route. - -* `admin_distance` - The route's administrative distance. Defaults to `0`. - -* `ip_address_prefix` - The IPv4 address prefix, in CIDR format, of the external network from which to route traffic. - -* `next_hop_vnic_set` - Name of the virtual NIC set to route matching packets to. Routed flows are load-balanced among all the virtual NICs in the virtual NIC set. - -## Import - -Route's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_route.route1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_sec_rule.html.markdown b/website/source/docs/providers/opc/r/opc_compute_sec_rule.html.markdown deleted file mode 100644 index 96a46b919..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_sec_rule.html.markdown +++ /dev/null @@ -1,57 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_sec_rule" -sidebar_current: "docs-opc-resource-sec-rule" -description: |- - Creates and manages a sec rule in an OPC identity domain. ---- - -# opc\_compute\_sec\_rule - -The ``opc_compute_sec_rule`` resource creates and manages a sec rule in an OPC identity domain, which joinstogether a source security list (or security IP list), a destination security list (or security IP list), and a security application. - -## Example Usage - -```hcl -resource "opc_compute_sec_rule" "test_rule" { - name = "test" - source_list = "seclist:${opc_compute_security_list.sec-list1.name}" - destination_list = "seciplist:${opc_compute_security_ip_list.sec-ip-list1.name}" - action = "permit" - application = "${opc_compute_security_application.spring-boot.name}" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The unique (within the identity domain) name of the security rule. - -* `description` - (Optional) A description for this security rule. - -* `source_list` - (Required) The source security list (prefixed with `seclist:`), or security IP list (prefixed with -`seciplist:`). - - * `destination_list` - (Required) The destination security list (prefixed with `seclist:`), or security IP list (prefixed with - `seciplist:`). - -* `application` - (Required) The name of the application to which the rule applies. - -* `action` - (Required) Whether to `permit`, `refuse` or `deny` packets to which this rule applies. This will ordinarily -be `permit`. - -* `disabled` - (Optional) Whether to disable this security rule. This is useful if you want to temporarily disable a rule -without removing it outright from your Terraform resource definition. Defaults to `false`. - -In addition to the above, the following values are exported: - -* `uri` - The Uniform Resource Identifier of the sec rule. - -## Import - -Sec Rule's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_sec_rule.rule1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_security_application.html.markdown b/website/source/docs/providers/opc/r/opc_compute_security_application.html.markdown deleted file mode 100644 index 2bf7fec5e..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_security_application.html.markdown +++ /dev/null @@ -1,57 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_security_application" -sidebar_current: "docs-opc-resource-security-application" -description: |- - Creates and manages a security application in an OPC identity domain. ---- - -# opc\_compute\_security\_application - -The ``opc_compute_security_application`` resource creates and manages a security application in an OPC identity domain. - -## Example Usage (TCP) - -```hcl -resource "opc_compute_security_application" "tomcat" { - name = "tomcat" - protocol = "tcp" - dport = "8080" -} -``` - -## Example Usage (ICMP) - -```hcl -resource "opc_compute_security_application" "tomcat" { - name = "tomcat" - protocol = "icmp" - icmptype = "echo" - icmpcode = "protocol" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The unique (within the identity domain) name of the application - -* `protocol` - (Required) The protocol to enable for this application. Must be one of -`tcp`, `udp`, `ah`, `esp`, `icmp`, `icmpv6`, `igmp`, `ipip`, `gre`, `mplsip`, `ospf`, `pim`, `rdp`, `sctp` or `all`. - -* `dport` - (Required) The port, or range of ports, to enable for this application, e.g `8080`, `6000-7000`. This must be set if the `protocol` is set to `tcp` or `udp`. - -* `icmptype` - (Optional) The ICMP type to enable for this application, if the `protocol` is `icmp`. Must be one of -`echo`, `reply`, `ttl`, `traceroute`, `unreachable`. - -* `icmpcode` - (Optional) The ICMP code to enable for this application, if the `protocol` is `icmp`. Must be one of -`admin`, `df`, `host`, `network`, `port` or `protocol`. - -## Import - -Security Application's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_security_application.application1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_security_association.html.markdown b/website/source/docs/providers/opc/r/opc_compute_security_association.html.markdown deleted file mode 100644 index 2d711d589..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_security_association.html.markdown +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_security_association" -sidebar_current: "docs-opc-resource-security-association" -description: |- - Creates and manages a security association in an OPC identity domain. ---- - -# opc\_compute\_security\_association - -The ``opc_compute_security_association`` resource creates and manages an association between an instance and a security -list in an OPC identity domain. - -## Example Usage - -```hcl -resource "opc_compute_security_association" "test_instance_sec_list_1" { - name = "association1" - vcable = "${opc_compute_instance.test_instance.vcable}" - seclist = "${opc_compute_security_list.sec_list1.name}" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Optional) The Name for the Security Association. If not specified, one is created automatically. Changing this forces a new resource to be created. - -* `vcable` - (Required) The `vcable` of the instance to associate to the security list. - -* `seclist` - (Required) The name of the security list to associate the instance to. - -## Import - -Security Association's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_security_association.association1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_security_ip_list.html.markdown b/website/source/docs/providers/opc/r/opc_compute_security_ip_list.html.markdown deleted file mode 100644 index 503c93efe..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_security_ip_list.html.markdown +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_security_ip_list" -sidebar_current: "docs-opc-resource-security-list" -description: |- - Creates and manages a security IP list in an OPC identity domain. ---- - -# opc\_compute\_security\_ip\_list - -The ``opc_compute_security_ip_list`` resource creates and manages a security IP list in an OPC identity domain. - -## Example Usage - -```hcl -resource "opc_compute_security_ip_list" "sec_ip_list1" { - name = "sec-ip-list1" - ip_entries = ["217.138.34.4"] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The unique (within the identity domain) name of the security IP list. - -* `ip_entries` - (Required) The IP addresses to include in the list. - -* `description` - (Optional) The description of the security ip list. - -## Import - -IP List's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_ip_list.list1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_security_list.html.markdown b/website/source/docs/providers/opc/r/opc_compute_security_list.html.markdown deleted file mode 100644 index 461e6603e..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_security_list.html.markdown +++ /dev/null @@ -1,41 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_security_list" -sidebar_current: "docs-opc-resource-security-list" -description: |- - Creates and manages a security list in an OPC identity domain. ---- - -# opc\_compute\_security\_list - -The ``opc_compute_security_list`` resource creates and manages a security list in an OPC identity domain. - -## Example Usage - -```hcl -resource "opc_compute_security_list" "sec_list1" { - name = "sec-list-1" - policy = "permit" - outbound_cidr_policy = "deny" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The unique (within the identity domain) name of the security list. - -* `policy` - (Required) The policy to apply to instances associated with this list. Must be one of `permit`, -`reject` (packets are dropped but a reply is sent) and `deny` (packets are dropped and no reply is sent). - -* `output_cidr_policy` - (Required) The policy for outbound traffic from the security list. Must be one of `permit`, -`reject` (packets are dropped but a reply is sent) and `deny` (packets are dropped and no reply is sent). - -## Import - -Security List's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_security_list.list1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_security_protocol.html.markdown b/website/source/docs/providers/opc/r/opc_compute_security_protocol.html.markdown deleted file mode 100644 index 00208321a..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_security_protocol.html.markdown +++ /dev/null @@ -1,65 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_security_protocol" -sidebar_current: "docs-opc-resource-security-protocol" -description: |- - Creates and manages an security protocol in an OPC identity domain. ---- - -# opc\_compute\_security\_protocol - -The ``opc_compute_security_protocol`` resource creates and manages a security protocol in an OPC identity domain. - -## Example Usage - -```hcl -resource "opc_compute_security_protocol" "default" { - name = "security-protocol-1" - dst_ports = ["2045-2050"] - src_ports = ["3045-3060"] - ip_protocol = "tcp" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the security protocol. - -* `dst_ports` (Optional) Enter a list of port numbers or port range strings. - Traffic is enabled by a security rule when a packet's destination port matches the - ports specified here. - For TCP, SCTP, and UDP, each port is a destination transport port, between 0 and 65535, - inclusive. For ICMP, each port is an ICMP type, between 0 and 255, inclusive. - If no destination ports are specified, all destination ports or ICMP types are allowed. - -* `src_ports` (Optional) Enter a list of port numbers or port range strings. - Traffic is enabled by a security rule when a packet's source port matches the - ports specified here. - For TCP, SCTP, and UDP, each port is a source transport port, - between 0 and 65535, inclusive. - For ICMP, each port is an ICMP type, between 0 and 255, inclusive. - If no source ports are specified, all source ports or ICMP types are allowed. - -* `ip_protocol` (Optional) The protocol used in the data portion of the IP datagram. - Permitted values are: tcp, udp, icmp, igmp, ipip, rdp, esp, ah, gre, icmpv6, ospf, pim, sctp, - mplsip, all. - Traffic is enabled by a security rule when the protocol in the packet matches the - protocol specified here. If no protocol is specified, all protocols are allowed. - -* `description` - (Optional) A description of the security protocol. - -* `tags` - (Optional) List of tags that may be applied to the security protocol. - -In addition to the above, the following values are exported: - -* `uri` - The Uniform Resource Identifier for the Security Protocol - -## Import - -ACL's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_security_protocol.default example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_security_rule.html.markdown b/website/source/docs/providers/opc/r/opc_compute_security_rule.html.markdown deleted file mode 100644 index 0a44150e7..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_security_rule.html.markdown +++ /dev/null @@ -1,62 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_security_rule" -sidebar_current: "docs-opc-resource-security-rule" -description: |- - Creates and manages a security rule in an OPC identity domain. ---- - -# opc\_compute\_security\_rule - -The ``opc_compute_security_rule`` resource creates and manages a security rule in an OPC identity domain. - -## Example Usage - -```hcl -resource "opc_compute_security_rule" "default" { - name = "SecurityRule1" - flow_direction = "ingress" - acl = "${opc_compute_acl.default.name}" - security_protocols = ["${opc_compute_security_protocol.default.name}"] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the security rule. - -* `flow_direction` - (Required) Specify the direction of flow of traffic, which is relative to the instances, for this security rule. Allowed values are ingress or egress. - -* `disabled` - (Optional) Whether to disable this security rule. This is useful if you want to temporarily disable a rule without removing it outright from your Terraform resource definition. Defaults to `false`. - -* `acl` - (Optional) Name of the ACL that contains this security rule. - -* `dst_ip_address_prefixes` - (Optional) List of IP address prefix set names to match the packet's destination IP address. - -* `src_ip_address_prefixes` - (Optional) List of names of IP address prefix set to match the packet's source IP address. - -* `dst_vnic_set` - (Optional) Name of virtual NIC set containing the packet's destination virtual NIC. - -* `src_vnic_set` - (Optional) Name of virtual NIC set containing the packet's source virtual NIC. - -* `security_protocols` - (Optional) List of security protocol object names to match the packet's protocol and port. - -* `description` - (Optional) A description of the security rule. - -* `tags` - (Optional) List of tags that may be applied to the security rule. - -## Attributes Reference - -In addition to the above, the following attributes are exported: - -* `uri` - The Uniform Resource Identifier of the security rule. - -## Import - -Security Rule's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_security_rule.rule1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_ssh_key.html.markdown b/website/source/docs/providers/opc/r/opc_compute_ssh_key.html.markdown deleted file mode 100644 index e982b935a..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_ssh_key.html.markdown +++ /dev/null @@ -1,40 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_ssh_key" -sidebar_current: "docs-opc-resource-ssh-key" -description: |- - Creates and manages an SSH key in an OPC identity domain. ---- - -# opc\_compute\_ssh_key - -The ``opc_compute_ssh_key`` resource creates and manages an SSH key in an OPC identity domain. - -## Example Usage - -```hcl -resource "opc_compute_ssh_key" "%s" { - name = "test-key" - key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCqw6JwbjIk..." - enabled = true -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The unique (within this identity domain) name of the SSH key. - -* `key` - (Required) The SSH key itself - -* `enabled` - (Optional) Whether or not the key is enabled. This is useful if you want to temporarily disable an SSH key, -without removing it entirely from your Terraform resource definition. Defaults to `true` - -## Import - -SSH Key's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_ssh_key.key1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_storage_volume.html.markdown b/website/source/docs/providers/opc/r/opc_compute_storage_volume.html.markdown deleted file mode 100644 index cfa19a2ad..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_storage_volume.html.markdown +++ /dev/null @@ -1,82 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_storage_volume" -sidebar_current: "docs-opc-resource-storage-volume-type" -description: |- - Creates and manages a storage volume in an OPC identity domain. ---- - -# opc\_compute\_storage\_volume - -The ``opc_compute_storage_volume`` resource creates and manages a storage volume in an OPC identity domain. - -~> **Caution:** The ``opc_compute_storage_volume`` resource can completely delete your storage volume just as easily as it can create it. To avoid costly accidents, consider setting [``prevent_destroy``](/docs/configuration/resources.html#prevent_destroy) on your storage volume resources as an extra safety measure. - -## Example Usage - -```hcl -resource "opc_compute_storage_volume" "test" { - name = "storageVolume1" - description = "Description for the Storage Volume" - size = 10 - tags = ["bar", "foo"] -} -``` - -## Example Usage (Bootable Volume) -```hcl -resource "opc_compute_image_list" "test" { - name = "imageList1" - description = "Description for the Image List" -} - -resource "opc_compute_image_list_entry" "test" { - name = "${opc_compute_image_list.test.name}" - machine_images = [ "/oracle/public/oel_6.7_apaas_16.4.5_1610211300" ] - version = 1 -} - -resource "opc_compute_storage_volume" "test" { - name = "storageVolume1" - description = "Description for the Bootable Storage Volume" - size = 30 - tags = ["first", "second"] - bootable = true - image_list = "${opc_compute_image_list.test.name}" - image_list_entry = "${opc_compute_image_list_entry.test.version}" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` (Required) The name for the Storage Account. -* `description` (Optional) The description of the storage volume. -* `size` (Required) The size of this storage volume in GB. The allowed range is from 1 GB to 2 TB (2048 GB). -* `storage_type` - (Optional) - The Type of Storage to provision. Possible values are `/oracle/public/storage/latency` or `/oracle/public/storage/default`. Defaults to `/oracle/public/storage/default`. -* `bootable` - (Optional) Is the Volume Bootable? Defaults to `false`. -* `image_list` - (Optional) Defines an image list. Required if `bootable` is set to `true`, optional if set to `false`. -* `image_list_entry` - (Optional) Defines an image list entry. Required if `bootable` is set to `true`, optional if set to `false`. -* `tags` - (Optional) Comma-separated strings that tag the storage volume. - -## Attributes Reference - -The following attributes are exported: - -* `hypervisor` - The hypervisor that this volume is compatible with. -* `machine_image` - Name of the Machine Image - available if the volume is a bootable storage volume. -* `managed` - Is this a Managed Volume? -* `platform` - The OS platform this volume is compatible with. -* `readonly` - Can this Volume be attached as readonly? -* `status` - The current state of the storage volume. -* `storage_pool` - The storage pool from which this volume is allocated. -* `uri` - Unique Resource Identifier of the Storage Volume. - -## Import - -Storage Volume's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_storage_volume.volume1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_storage_volume_snapshot.html.markdown b/website/source/docs/providers/opc/r/opc_compute_storage_volume_snapshot.html.markdown deleted file mode 100644 index 885739762..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_storage_volume_snapshot.html.markdown +++ /dev/null @@ -1,59 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_storage_volume_snapshot" -sidebar_current: "docs-opc-resource-storage-volume-snapshot" -description: |- - Creates and manages a storage volume snapshot in an OPC identity domain. ---- - -# opc\_compute\_storage\_volume_snapshot - -The ``opc_compute_storage_volume_snapshot`` resource creates and manages a storage volume snapshot in an OPC identity domain. - -## Example Usage - -```hcl -resource "opc_compute_storage_volume_snapshot" "test" { - name = "storageVolume1" - description = "Description for the Storage Volume" - tags = ["bar", "foo"] - collocated = true - volume_name = "${opc_compute_storage_volume.foo.name}" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `volume_name` (Required) The name of the storage volume to create the snapshot from. -* `description` (Optional) The description of the storage volume snapshot. -* `name` (Optional) The name of the storage volume snapshot. Will be generated if unspecified. -* `parent_volume_bootable` (Optional) A string value of whether or not the parent volume is 'bootable' or not. Defaults to `"false"`. -* `collocated` (Optional) Boolean specifying whether the snapshot is collocated or remote. Defaults to `false`. -* `tags` - (Optional) Comma-separated strings that tag the storage volume. - -## Attributes Reference - -In addition to the attributes above, the following attributes are exported: - -* `account` - Account to use for snapshots. -* `machine_image_name` - The name of the machine image that's used in the boot volume from which this snapshot is taken. -* `size` - The size of the snapshot in GB. -* `property` - Where the snapshot is stored, whether collocated, or in the Oracle Storage Cloud Service instance. -* `platform` - The OS platform this snapshot is compatible with -* `snapshot_timestamp` - Timestamp of the storage snapshot, generated by storage server. The snapshot will contain data written to the original volume before this time. -* `snapshot_id` - The Oracle ID of the snapshot. -* `start_timestamp` - Timestamp when the snapshot was started. -* `status` - Status of the snapshot. -* `status_detail` - Details about the latest state of the storage volume snapshot. -* `status_timestamp` - Indicates the time that the current view of the storage volume snapshot was generated. -* `uri` - Uniform Resource Identifier - -## Import - -Storage Volume Snapshot's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_storage_volume_snapshot.volume1 example -``` diff --git a/website/source/docs/providers/opc/r/opc_compute_vnic_set.html.markdown b/website/source/docs/providers/opc/r/opc_compute_vnic_set.html.markdown deleted file mode 100644 index 191ffa159..000000000 --- a/website/source/docs/providers/opc/r/opc_compute_vnic_set.html.markdown +++ /dev/null @@ -1,45 +0,0 @@ ---- -layout: "opc" -page_title: "Oracle: opc_compute_vnic_set" -sidebar_current: "docs-opc-resource-vnic-set" -description: |- - Creates and manages a virtual NIC set in an OPC identity domain ---- - -# opc\_compute\_vnic\_set - -The ``opc_compute_vnic_set`` resource creates and manages a virtual NIC set in an OPC identity domain. - -## Example Usage - -```hcl -resource "opc_compute_vnic_set" "test_set" { - name = "test_vnic_set" - description = "My vnic set" - applied_acls = ["acl1", "acl2"] - virtual_nics = ["nic1", "nic2", "nic3"] - tags = ["xyzzy", "quux"] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The unique (within this identity domain) name of the virtual nic set. - -* `description` - (Optional) A description of the virtual nic set. - -* `applied_acls` - (Optional) A list of the ACLs to apply to the virtual nics in the set. - -* `virtual_nics` - (Optional) List of virtual NICs associated with this virtual NIC set. - -* `tags` - (Optional) A list of tags to apply to the storage volume. - -## Import - -VNIC Set's can be imported using the `resource name`, e.g. - -```shell -$ terraform import opc_compute_vnic_set.set1 example -```