From d05af76607fee831ee7bf3f8057abdf72ae34de2 Mon Sep 17 00:00:00 2001 From: Jake Champlin Date: Tue, 4 Apr 2017 16:28:11 -0400 Subject: [PATCH] add image_list_entry resource --- builtin/providers/opc/provider.go | 1 + .../opc/resource_image_list_entry.go | 160 +++++++++++++++++ .../opc/resource_image_list_entry_test.go | 161 ++++++++++++++++++ .../opc/resource_security_protocol.go | 1 + ...opc_compute_image_list_entry.html.markdown | 52 ++++++ .../d/opc_compute_vnic.html.markdown | 36 ---- .../providers/oracleopc/index.html.markdown | 55 ------ .../r/opc_compute_instance.html.markdown | 68 -------- .../opc_compute_ip_association.html.markdown | 31 ---- .../opc_compute_ip_reservation.html.markdown | 33 ---- ...compute_security_application.html.markdown | 39 ----- ...compute_security_association.html.markdown | 29 ---- ...opc_compute_security_ip_list.html.markdown | 28 --- .../r/opc_compute_security_list.html.markdown | 33 ---- .../r/opc_compute_security_rule.html.markdown | 46 ----- .../r/opc_compute_ssh_key.html.markdown | 32 ---- .../opc_compute_storage_volume.html.markdown | 49 ------ website/source/layouts/opc.erb | 3 + website/source/layouts/oracleopc.erb | 59 ------- 19 files changed, 378 insertions(+), 538 deletions(-) create mode 100644 builtin/providers/opc/resource_image_list_entry.go create mode 100644 builtin/providers/opc/resource_image_list_entry_test.go create mode 100644 website/source/docs/providers/opc/r/opc_compute_image_list_entry.html.markdown delete mode 100644 website/source/docs/providers/oracleopc/d/opc_compute_vnic.html.markdown delete mode 100644 website/source/docs/providers/oracleopc/index.html.markdown delete mode 100644 website/source/docs/providers/oracleopc/r/opc_compute_instance.html.markdown delete mode 100644 website/source/docs/providers/oracleopc/r/opc_compute_ip_association.html.markdown delete mode 100644 website/source/docs/providers/oracleopc/r/opc_compute_ip_reservation.html.markdown delete mode 100644 website/source/docs/providers/oracleopc/r/opc_compute_security_application.html.markdown delete mode 100644 website/source/docs/providers/oracleopc/r/opc_compute_security_association.html.markdown delete mode 100644 website/source/docs/providers/oracleopc/r/opc_compute_security_ip_list.html.markdown delete mode 100644 website/source/docs/providers/oracleopc/r/opc_compute_security_list.html.markdown delete mode 100644 website/source/docs/providers/oracleopc/r/opc_compute_security_rule.html.markdown delete mode 100644 website/source/docs/providers/oracleopc/r/opc_compute_ssh_key.html.markdown delete mode 100644 website/source/docs/providers/oracleopc/r/opc_compute_storage_volume.html.markdown delete mode 100644 website/source/layouts/oracleopc.erb diff --git a/builtin/providers/opc/provider.go b/builtin/providers/opc/provider.go index 46b4fcc95..e1ac86dee 100644 --- a/builtin/providers/opc/provider.go +++ b/builtin/providers/opc/provider.go @@ -53,6 +53,7 @@ func Provider() terraform.ResourceProvider { "opc_compute_ip_network": resourceOPCIPNetwork(), "opc_compute_acl": resourceOPCACL(), "opc_compute_image_list": resourceOPCImageList(), + "opc_compute_image_list_entry": resourceOPCImageListEntry(), "opc_compute_instance": resourceInstance(), "opc_compute_ip_address_reservation": resourceOPCIPAddressReservation(), "opc_compute_ip_association": resourceOPCIPAssociation(), diff --git a/builtin/providers/opc/resource_image_list_entry.go b/builtin/providers/opc/resource_image_list_entry.go new file mode 100644 index 000000000..8262657b5 --- /dev/null +++ b/builtin/providers/opc/resource_image_list_entry.go @@ -0,0 +1,160 @@ +package opc + +import ( + "fmt" + "strconv" + "strings" + + "github.com/hashicorp/go-oracle-terraform/compute" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/structure" + "github.com/hashicorp/terraform/helper/validation" +) + +func resourceOPCImageListEntry() *schema.Resource { + return &schema.Resource{ + Create: resourceOPCImageListEntryCreate, + Read: resourceOPCImageListEntryRead, + Delete: resourceOPCImageListEntryDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "name": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "machine_images": { + Type: schema.TypeList, + Required: true, + ForceNew: true, + Elem: &schema.Schema{Type: schema.TypeString}, + }, + "version": { + Type: schema.TypeInt, + ForceNew: true, + Required: true, + }, + "attributes": { + Type: schema.TypeString, + ForceNew: true, + Optional: true, + ValidateFunc: validation.ValidateJsonString, + DiffSuppressFunc: structure.SuppressJsonDiff, + }, + "uri": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceOPCImageListEntryCreate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*compute.Client).ImageListEntries() + + name := d.Get("name").(string) + machineImages := expandOPCImageListEntryMachineImages(d) + version := d.Get("version").(int) + + createInput := &compute.CreateImageListEntryInput{ + Name: name, + MachineImages: machineImages, + Version: version, + } + + if v, ok := d.GetOk("attributes"); ok { + attributesString := v.(string) + attributes, err := structure.ExpandJsonFromString(attributesString) + if err != nil { + return err + } + + createInput.Attributes = attributes + } + + _, err := client.CreateImageListEntry(createInput) + if err != nil { + return err + } + + id := generateOPCImageListEntryID(name, version) + d.SetId(id) + return resourceOPCImageListEntryRead(d, meta) +} + +func resourceOPCImageListEntryRead(d *schema.ResourceData, meta interface{}) error { + client := meta.(*compute.Client).ImageListEntries() + + name, version, err := parseOPCImageListEntryID(d.Id()) + if err != nil { + return err + } + + getInput := compute.GetImageListEntryInput{ + Name: *name, + Version: *version, + } + getResult, err := client.GetImageListEntry(&getInput) + if err != nil { + return err + } + + attrs, err := structure.FlattenJsonToString(getResult.Attributes) + if err != nil { + return err + } + + d.Set("name", name) + d.Set("machine_images", getResult.MachineImages) + d.Set("version", getResult.Version) + d.Set("attributes", attrs) + d.Set("uri", getResult.Uri) + + return nil +} + +func resourceOPCImageListEntryDelete(d *schema.ResourceData, meta interface{}) error { + client := meta.(*compute.Client).ImageListEntries() + + name, version, err := parseOPCImageListEntryID(d.Id()) + if err != nil { + return err + } + + deleteInput := &compute.DeleteImageListEntryInput{ + Name: *name, + Version: *version, + } + err = client.DeleteImageListEntry(deleteInput) + if err != nil { + return err + } + + return nil +} + +func parseOPCImageListEntryID(id string) (*string, *int, error) { + s := strings.Split(id, "|") + name, versionString := s[0], s[1] + version, err := strconv.Atoi(versionString) + if err != nil { + return nil, nil, err + } + + return &name, &version, nil +} + +func expandOPCImageListEntryMachineImages(d *schema.ResourceData) []string { + machineImages := []string{} + for _, i := range d.Get("machine_images").([]interface{}) { + machineImages = append(machineImages, i.(string)) + } + return machineImages +} + +func generateOPCImageListEntryID(name string, version int) string { + return fmt.Sprintf("%s|%d", name, version) +} diff --git a/builtin/providers/opc/resource_image_list_entry_test.go b/builtin/providers/opc/resource_image_list_entry_test.go new file mode 100644 index 000000000..4d76bd0a6 --- /dev/null +++ b/builtin/providers/opc/resource_image_list_entry_test.go @@ -0,0 +1,161 @@ +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 - -``` -resource "opc_compute_instance" "test_instance" { - name = "test" - label = "test" - shape = "oc3" - imageList = "/oracle/public/oel_6.4_2GB_v1" - sshKeys = ["${opc_compute_ssh_key.key1.name}"] - attributes = "{\"foo\":\"bar\"}" - storage = [{ - index = 1 - volume = "${opc_compute_storage_volume.test_volume.name}" - }, - { - index = 2 - volume = "${opc_compute_storage_volume.test_volume2.name}" - }] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The name of the instance. This need not be unique, as each instance is assigned a separate -computed `opcId`. - -* `shape` - (Required) The shape of the instance, e.g. `oc4`. - -* `imageList` - (Optional) The imageList of the instance, e.g. `/oracle/public/oel_6.4_2GB_v1` - -* `label` - (Optional) The label to apply to the instance. - -* `ip` - (Computed) The internal IP address assigned to the instance. - -* `opcId` - (Computed) The interned ID assigned to the instance. - -* `sshKeys` - (Optional) The names of the SSH Keys that can be used to log into the instance. - -* `attributes` - (Optional) An arbitrary JSON-formatted collection of attributes which is made available to the instance. - -* `vcable` - (Computed) The ID of the instance's VCable, which is used to associate it with reserved IP addresses and -add it to Security Lists. - -* `storage` - (Optional) A set of zero or more storage volumes to attach to the instance. Each volume has two arguments: -`index`, which is the volume's index in the instance's list of mounted volumes, and `name`, which is the name of the -storage volume to mount. - -* `bootOrder` - (Optional) The index number of the bootable storage volume that should be used to boot the instance. e.g. `[ 1 ]`. If you specify both `bootOrder` and `imageList`, the imagelist attribute is ignored. diff --git a/website/source/docs/providers/oracleopc/r/opc_compute_ip_association.html.markdown b/website/source/docs/providers/oracleopc/r/opc_compute_ip_association.html.markdown deleted file mode 100644 index 2518b2df1..000000000 --- a/website/source/docs/providers/oracleopc/r/opc_compute_ip_association.html.markdown +++ /dev/null @@ -1,31 +0,0 @@ ---- -layout: "oracleopc" -page_title: "Oracle: opc_compute_ip_association" -sidebar_current: "docs-oracleopc-resource-ip-association" -description: |- - Creates and manages an IP association in an OPC identity domain. ---- - -# 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. - -## Example Usage - -``` -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`. diff --git a/website/source/docs/providers/oracleopc/r/opc_compute_ip_reservation.html.markdown b/website/source/docs/providers/oracleopc/r/opc_compute_ip_reservation.html.markdown deleted file mode 100644 index 44b70cc0f..000000000 --- a/website/source/docs/providers/oracleopc/r/opc_compute_ip_reservation.html.markdown +++ /dev/null @@ -1,33 +0,0 @@ ---- -layout: "oracleopc" -page_title: "Oracle: opc_compute_ip_reservation" -sidebar_current: "docs-oracleopc-resource-ip-reservation" -description: |- - Creates and manages an IP reservation in an OPC identity domain. ---- - -# opc\_compute\_ip\_reservation - -The ``opc_compute_ip_reservation`` resource creates and manages an IP reservation in an OPC identity domain. - -## Example Usage - -``` -resource "opc_compute_ip_reservation" "reservation1" { - parentpool = "/oracle/public/ippool" - permanent = true - tags = [] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `parentpool` - (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). - -* `tags` - (Optional) List of tags that may be applied to the IP reservation. diff --git a/website/source/docs/providers/oracleopc/r/opc_compute_security_application.html.markdown b/website/source/docs/providers/oracleopc/r/opc_compute_security_application.html.markdown deleted file mode 100644 index 94760f082..000000000 --- a/website/source/docs/providers/oracleopc/r/opc_compute_security_application.html.markdown +++ /dev/null @@ -1,39 +0,0 @@ ---- -layout: "oracleopc" -page_title: "Oracle: opc_compute_security_application" -sidebar_current: "docs-oracleopc-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 - -``` -resource "opc_compute_security_application" "tomcat" { - name = "tomcat" - protocol = "tcp" - dport = "8080" -} -``` - -## 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 either one of -`tcp`, `udp`, `icmp`, `igmp`, `ipip`, `rdp`, `esp`, `ah`, `gre`, `icmpv6`, `ospf`, `pim`, `sctp`, `mplsip` or `all`, or -the corresponding integer in the range 0-254 from the list of [assigned protocol numbers](http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml) - -* `dport` - (Required) The port, or range of ports, to enable for this application, e.g `8080`, `6000-7000`. - -* `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 -`network`, `host`, `protocol`, `port`, `df`, `admin`. diff --git a/website/source/docs/providers/oracleopc/r/opc_compute_security_association.html.markdown b/website/source/docs/providers/oracleopc/r/opc_compute_security_association.html.markdown deleted file mode 100644 index 49207c879..000000000 --- a/website/source/docs/providers/oracleopc/r/opc_compute_security_association.html.markdown +++ /dev/null @@ -1,29 +0,0 @@ ---- -layout: "oracleopc" -page_title: "Oracle: opc_compute_security_association" -sidebar_current: "docs-oracleopc-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 - -``` -resource "opc_compute_security_association" "test_instance_sec_list_1" { - vcable = "${opc_compute_instance.test_instance.vcable}" - seclist = "${opc_compute_security_list.sec_list1.name}" -} -``` - -## Argument Reference - -The following arguments are supported: - -* `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. diff --git a/website/source/docs/providers/oracleopc/r/opc_compute_security_ip_list.html.markdown b/website/source/docs/providers/oracleopc/r/opc_compute_security_ip_list.html.markdown deleted file mode 100644 index 62f40d839..000000000 --- a/website/source/docs/providers/oracleopc/r/opc_compute_security_ip_list.html.markdown +++ /dev/null @@ -1,28 +0,0 @@ ---- -layout: "oracleopc" -page_title: "Oracle: opc_compute_security_ip_list" -sidebar_current: "docs-oracleopc-resource-security-ip-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 - -``` -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. diff --git a/website/source/docs/providers/oracleopc/r/opc_compute_security_list.html.markdown b/website/source/docs/providers/oracleopc/r/opc_compute_security_list.html.markdown deleted file mode 100644 index 64547a41e..000000000 --- a/website/source/docs/providers/oracleopc/r/opc_compute_security_list.html.markdown +++ /dev/null @@ -1,33 +0,0 @@ ---- -layout: "oracleopc" -page_title: "Oracle: opc_compute_security_list" -sidebar_current: "docs-oracleopc-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 - -``` -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). diff --git a/website/source/docs/providers/oracleopc/r/opc_compute_security_rule.html.markdown b/website/source/docs/providers/oracleopc/r/opc_compute_security_rule.html.markdown deleted file mode 100644 index 6497b0265..000000000 --- a/website/source/docs/providers/oracleopc/r/opc_compute_security_rule.html.markdown +++ /dev/null @@ -1,46 +0,0 @@ ---- -layout: "oracleopc" -page_title: "Oracle: opc_compute_security_rule" -sidebar_current: "docs-oracleopc-resource-security-rule" -description: |- - Creates and manages a security rule in an OPC identity domain. ---- - -# opc\_compute\_ip\_reservation - -The ``opc_compute_security_rule`` resource creates and manages a security rule in an OPC identity domain, which joins -together a source security list (or security IP list), a destination security list (or security IP list), and a security -application. - -## Example Usage - -``` -resource "opc_compute_security_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}" - disabled = false -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The unique (within the identity domain) name of the 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` - (Required) 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. diff --git a/website/source/docs/providers/oracleopc/r/opc_compute_ssh_key.html.markdown b/website/source/docs/providers/oracleopc/r/opc_compute_ssh_key.html.markdown deleted file mode 100644 index ff85467d8..000000000 --- a/website/source/docs/providers/oracleopc/r/opc_compute_ssh_key.html.markdown +++ /dev/null @@ -1,32 +0,0 @@ ---- -layout: "oracleopc" -page_title: "Oracle: opc_compute_ssh_key" -sidebar_current: "docs-oracleopc-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 - -``` -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` - (Required) 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. diff --git a/website/source/docs/providers/oracleopc/r/opc_compute_storage_volume.html.markdown b/website/source/docs/providers/oracleopc/r/opc_compute_storage_volume.html.markdown deleted file mode 100644 index 4b30b59ed..000000000 --- a/website/source/docs/providers/oracleopc/r/opc_compute_storage_volume.html.markdown +++ /dev/null @@ -1,49 +0,0 @@ ---- -layout: "oracleopc" -page_title: "Oracle: opc_compute_storage_volume" -sidebar_current: "docs-oracleopc-resource-storage-volume" -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 - -``` -resource "opc_compute_storage_volume" "test_volume" { - size = "3g" - description = "My storage volume" - name = "test_volume_a" - tags = ["xyzzy", "quux"] -} -``` - -## Argument Reference - -The following arguments are supported: - -* `name` - (Required) The unique (within this identity domain) name of the storage volume. - -* `size` - (Required) The size of the storage instance. - -* `description` - (Optional) A description of the storage volume. - -* `tags` - (Optional) A list of tags to apply to the storage volume. - -* `bootableImage` - (Optional) The name of the bootable image the storage volume is loaded with. - -* `bootableImageVersion` - (Optional) The version of the bootable image specified in `bootableImage` to use. - -* `snapshot` - (Optional) The snapshot to initialise the storage volume with. This has two nested properties: `name`, -for the name of the snapshot to use, and `account` for the name of the snapshot account to use. - -* `snapshotId` - (Optional) The id of the snapshot to initialise the storage volume with. diff --git a/website/source/layouts/opc.erb b/website/source/layouts/opc.erb index 8c9bfd793..f27a27e8b 100644 --- a/website/source/layouts/opc.erb +++ b/website/source/layouts/opc.erb @@ -31,6 +31,9 @@ > opc_compute_image_list + > + opc_compute_image_list_entry + > opc_compute_instance diff --git a/website/source/layouts/oracleopc.erb b/website/source/layouts/oracleopc.erb deleted file mode 100644 index a9d9579f8..000000000 --- a/website/source/layouts/oracleopc.erb +++ /dev/null @@ -1,59 +0,0 @@ -<% wrap_layout :inner do %> -<% content_for :sidebar do %> - -<% end %> - -<%= yield %> -<% end %>