Skip to content

Commit e5a8760

Browse files
NagendraNigadejotruon
authored andcommitted
Added support for - Cluster Network: new optional parameter to Update API
1 parent 2e07c07 commit e5a8760

9 files changed

+52
-50
lines changed

internal/integrationtest/core_cluster_network_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var (
5353
"freeform_tags": acctest.Representation{RepType: acctest.Optional, Create: map[string]string{"Department": "Finance"}, Update: map[string]string{"Department": "Accounting"}},
5454
}
5555
clusterNetworkInstancePoolsRepresentation = map[string]interface{}{
56-
"instance_configuration_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_instance_configuration.test_instance_configuration.id}`},
56+
"instance_configuration_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_core_instance_configuration.test_instance_configuration.id}`, Update: `${oci_core_instance_configuration.test_instance_configuration.id}`},
5757
"size": acctest.Representation{RepType: acctest.Required, Create: `1`, Update: `2`},
5858
"defined_tags": acctest.Representation{RepType: acctest.Optional, Create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, Update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`},
5959
"display_name": acctest.Representation{RepType: acctest.Optional, Create: `hpc-cluster-network-pool`, Update: `hpc-cluster-network-pool2`},

internal/service/core/core_cluster_network_resource.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ func CoreClusterNetworkResource() *schema.Resource {
4343
"instance_configuration_id": {
4444
Type: schema.TypeString,
4545
Required: true,
46-
ForceNew: true,
4746
},
4847
"size": {
4948
Type: schema.TypeInt,
@@ -652,6 +651,11 @@ func (s *CoreClusterNetworkResourceCrud) mapToUpdateClusterNetworkInstancePoolDe
652651
result.Id = &tmp
653652
}
654653

654+
if instanceConfigurationId, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "instance_configuration_id")); ok {
655+
tmp := instanceConfigurationId.(string)
656+
result.InstanceConfigurationId = &tmp
657+
}
658+
655659
if size, ok := s.D.GetOkExists(fmt.Sprintf(fieldKeyFormat, "size")); ok {
656660
tmp := size.(int)
657661
result.Size = &tmp

website/docs/d/core_instance.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ The following attributes are exported:
9393

9494
The default iPXE script connects to the instance's local boot volume over iSCSI and performs a network boot. If you use a custom iPXE script and want to network-boot from the instance's local boot volume over iSCSI the same way as the default iPXE script, use the following iSCSI IP address: 169.254.0.2, and boot volume IQN: iqn.2015-02.oracle.boot.
9595

96-
If your instance boot volume type is paravirtualized, the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. If your instance boot volume type is paravirtualized and you use custom iPXE to network boot into your instance, the primary boot volume is attached as a data volume through virtio-scsi drive.
96+
If your instance boot volume type is paravirtualized, the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. If your instance boot volume type is paravirtualized and you use custom iPXE to network boot into your instance, the primary boot volume is attached as a data volume through virtio-scsi drive.
9797

9898
For more information about the Bring Your Own Image feature of Oracle Cloud Infrastructure, see [Bring Your Own Image](https://docs.cloud.oracle.com/iaas/Content/Compute/References/bringyourownimage.htm).
9999

website/docs/d/core_instance_configuration.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ The following attributes are exported:
100100
* `STOP_INSTANCE` - The instance is recovered in the stopped state.
101101
* `availability_domain` - The availability domain of the instance. Example: `Uocm:PHX-AD-1`
102102
* `capacity_reservation_id` - The OCID of the compute capacity reservation this instance is launched under.
103-
* `compartment_id` - The OCID of the compartment containing the instance. Instances created from instance configurations are placed in the same compartment as the instance that was used to create the instance configuration.
103+
* `compartment_id` - The OCID of the compartment containing the instance. Instances created from instance configurations are placed in the same compartment as the instance that was used to create the instance configuration.
104104
* `create_vnic_details` - Contains the properties of the VNIC for an instance configuration. See [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/CreateVnicDetails/) and [Instance Configurations](https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/instancemanagement.htm#config) for more information.
105105
* `assign_private_dns_record` - Whether the VNIC should be assigned a private DNS record. See the `assignPrivateDnsRecord` attribute of [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/20160918/CreateVnicDetails/) for more information.
106106
* `assign_public_ip` - Whether the VNIC should be assigned a public IP address. See the `assignPublicIp` attribute of [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/CreateVnicDetails/) for more information.

website/docs/d/core_instance_configurations.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The following attributes are exported:
107107
* `STOP_INSTANCE` - The instance is recovered in the stopped state.
108108
* `availability_domain` - The availability domain of the instance. Example: `Uocm:PHX-AD-1`
109109
* `capacity_reservation_id` - The OCID of the compute capacity reservation this instance is launched under.
110-
* `compartment_id` - The OCID of the compartment containing the instance. Instances created from instance configurations are placed in the same compartment as the instance that was used to create the instance configuration.
110+
* `compartment_id` - The OCID of the compartment containing the instance. Instances created from instance configurations are placed in the same compartment as the instance that was used to create the instance configuration.
111111
* `create_vnic_details` - Contains the properties of the VNIC for an instance configuration. See [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/CreateVnicDetails/) and [Instance Configurations](https://docs.cloud.oracle.com/iaas/Content/Compute/Concepts/instancemanagement.htm#config) for more information.
112112
* `assign_private_dns_record` - Whether the VNIC should be assigned a private DNS record. See the `assignPrivateDnsRecord` attribute of [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/20160918/CreateVnicDetails/) for more information.
113113
* `assign_public_ip` - Whether the VNIC should be assigned a public IP address. See the `assignPublicIp` attribute of [CreateVnicDetails](https://docs.cloud.oracle.com/iaas/api/#/en/iaas/latest/CreateVnicDetails/) for more information.

website/docs/d/core_instances.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ The following attributes are exported:
109109

110110
The default iPXE script connects to the instance's local boot volume over iSCSI and performs a network boot. If you use a custom iPXE script and want to network-boot from the instance's local boot volume over iSCSI the same way as the default iPXE script, use the following iSCSI IP address: 169.254.0.2, and boot volume IQN: iqn.2015-02.oracle.boot.
111111

112-
If your instance boot volume type is paravirtualized, the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. If your instance boot volume type is paravirtualized and you use custom iPXE to network boot into your instance, the primary boot volume is attached as a data volume through virtio-scsi drive.
112+
If your instance boot volume type is paravirtualized, the boot volume is attached to the instance through virtio-scsi and no iPXE script is used. If your instance boot volume type is paravirtualized and you use custom iPXE to network boot into your instance, the primary boot volume is attached as a data volume through virtio-scsi drive.
113113

114114
For more information about the Bring Your Own Image feature of Oracle Cloud Infrastructure, see [Bring Your Own Image](https://docs.cloud.oracle.com/iaas/Content/Compute/References/bringyourownimage.htm).
115115

website/docs/d/core_volume_attachments.html.markdown

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ layout: "oci"
44
page_title: "Oracle Cloud Infrastructure: oci_core_volume_attachments"
55
sidebar_current: "docs-oci-datasource-core-volume_attachments"
66
description: |-
7-
Provides the list of Volume Attachments in Oracle Cloud Infrastructure Core service
7+
Provides the list of Volume Attachments in Oracle Cloud Infrastructure Core service
88
---
99

1010
# Data Source: oci_core_volume_attachments
@@ -35,7 +35,7 @@ data "oci_core_volume_attachments" "test_volume_attachments" {
3535

3636
The following arguments are supported:
3737

38-
* `availability_domain` - (Optional) The name of the availability domain. Example: `Uocm:PHX-AD-1`
38+
* `availability_domain` - (Optional) The name of the availability domain. Example: `Uocm:PHX-AD-1`
3939
* `compartment_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment.
4040
* `instance_id` - (Optional) The OCID of the instance.
4141
* `volume_id` - (Optional) The OCID of the volume.
@@ -52,27 +52,26 @@ The following attributes are exported:
5252
The following attributes are exported:
5353

5454
* `attachment_type` - The type of volume attachment.
55-
* `availability_domain` - The availability domain of an instance. Example: `Uocm:PHX-AD-1`
56-
* `chap_secret` - The Challenge-Handshake-Authentication-Protocol (CHAP) secret valid for the associated CHAP user name. (Also called the "CHAP password".)
57-
* `chap_username` - The volume's system-generated Challenge-Handshake-Authentication-Protocol (CHAP) user name. See [RFC 1994](https://tools.ietf.org/html/rfc1994) for more on CHAP. Example: `ocid1.volume.oc1.phx.<unique_ID>`
55+
* `availability_domain` - The availability domain of an instance. Example: `Uocm:PHX-AD-1`
56+
* `chap_secret` - The Challenge-Handshake-Authentication-Protocol (CHAP) secret valid for the associated CHAP user name. (Also called the "CHAP password".)
57+
* `chap_username` - The volume's system-generated Challenge-Handshake-Authentication-Protocol (CHAP) user name. See [RFC 1994](https://tools.ietf.org/html/rfc1994) for more on CHAP. Example: `ocid1.volume.oc1.phx.<unique_ID>`
5858
* `compartment_id` - The OCID of the compartment.
5959
* `device` - The device name.
60-
* `display_name` - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
61-
* `encryption_in_transit_type` - Refer the top-level definition of encryptionInTransitType. The default value is NONE.
60+
* `display_name` - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
61+
* `encryption_in_transit_type` - Refer the top-level definition of encryptionInTransitType. The default value is NONE.
6262
* `id` - The OCID of the volume attachment.
6363
* `instance_id` - The OCID of the instance the volume is attached to.
64-
* `ipv4` - The volume's iSCSI IP address. Example: `169.254.0.2`
65-
* `iqn` - The target volume's iSCSI Qualified Name in the format defined by [RFC 3720](https://tools.ietf.org/html/rfc3720#page-32). Example: `iqn.2015-12.us.oracle.com:<CHAP_username>`
66-
* `is_multipath` - Whether the attachment is multipath or not.
64+
* `ipv4` - The volume's iSCSI IP address. Example: `169.254.0.2`
65+
* `iqn` - The target volume's iSCSI Qualified Name in the format defined by [RFC 3720](https://tools.ietf.org/html/rfc3720#page-32). Example: `iqn.2015-12.us.oracle.com:<CHAP_username>`
66+
* `is_multipath` - Whether the Iscsi or Paravirtualized attachment is multipath or not, it is not applicable to NVMe attachment.
6767
* `is_pv_encryption_in_transit_enabled` - Whether in-transit encryption for the data volume's paravirtualized attachment is enabled or not.
6868
* `is_read_only` - Whether the attachment was created in read-only mode.
69-
* `iscsi_login_state` - The iscsi login state of the volume attachment. For a multipath volume attachment, all iscsi sessions need to be all logged-in or logged-out to be in logged-in or logged-out state.
69+
* `iscsi_login_state` - The iscsi login state of the volume attachment. For a Iscsi volume attachment, all iscsi sessions need to be all logged-in or logged-out to be in logged-in or logged-out state.
7070
* `multipath_devices` - A list of secondary multipath devices
71-
* `ipv4` - The volume's iSCSI IP address. Example: `169.254.2.2`
72-
* `iqn` - The target volume's iSCSI Qualified Name in the format defined by [RFC 3720](https://tools.ietf.org/html/rfc3720#page-32). Example: `iqn.2015-12.com.oracleiaas:40b7ee03-883f-46c6-a951-63d2841d2195`
73-
* `port` - The volume's iSCSI port, usually port 860 or 3260. Example: `3260`
74-
* `port` - The volume's iSCSI port, usually port 860 or 3260. Example: `3260`
71+
* `ipv4` - The volume's iSCSI IP address. Example: `169.254.2.2`
72+
* `iqn` - The target volume's iSCSI Qualified Name in the format defined by [RFC 3720](https://tools.ietf.org/html/rfc3720#page-32). Example: `iqn.2015-12.com.oracleiaas:40b7ee03-883f-46c6-a951-63d2841d2195`
73+
* `port` - The volume's iSCSI port, usually port 860 or 3260. Example: `3260`
74+
* `port` - The volume's iSCSI port, usually port 860 or 3260. Example: `3260`
7575
* `state` - The current state of the volume attachment.
76-
* `time_created` - The date and time the volume was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z`
77-
* `volume_id` - The OCID of the volume.
78-
76+
* `time_created` - The date and time the volume was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: `2016-08-25T21:10:29.600Z`
77+
* `volume_id` - The OCID of the volume.

website/docs/r/core_cluster_network.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ The following arguments are supported:
6767
* `defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
6868
* `display_name` - (Optional) (Updatable) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
6969
* `freeform_tags` - (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
70-
* `instance_configuration_id` - (Required) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration associated with the instance pool.
70+
* `instance_configuration_id` - (Required) (Updatable) The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the instance configuration associated with the instance pool.
7171
* `size` - (Required) (Updatable) The number of instances that should be in the instance pool.
7272
* `placement_configuration` - (Required) The location for where the instance pools in a cluster network will place instances.
7373
* `availability_domain` - (Required) The availability domain to place instances. Example: `Uocm:PHX-AD-1`

0 commit comments

Comments
 (0)