From 359d919a3e479a62a90e914a244912798c990c06 Mon Sep 17 00:00:00 2001 From: Ujjwal Kumar <78945437+ujjwal-ibm@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:02:56 +0530 Subject: [PATCH] fixed instance, instance template documents, alignment (#5850) * fixed instance, instance template documents, alignment * document fix for cluster_network_attachments name --- website/docs/r/is_instance.html.markdown | 36 ++++++++-- ...e_cluster_network_attachment.html.markdown | 68 ++++++++++++------- .../docs/r/is_instance_template.html.markdown | 38 +++++------ 3 files changed, 94 insertions(+), 48 deletions(-) diff --git a/website/docs/r/is_instance.html.markdown b/website/docs/r/is_instance.html.markdown index e2398ebcb9..70ef0718fe 100644 --- a/website/docs/r/is_instance.html.markdown +++ b/website/docs/r/is_instance.html.markdown @@ -639,10 +639,30 @@ Cluster Networks for VPC is available for select customers only. Contact IBM Sup - `cluster_network_attachments` - (Optional, List) The cluster network attachments for this virtual server instance.The cluster network attachments are ordered for consistent instance configuration. Nested schema for **cluster_network_attachments**: - - `href` - (Required, String) The URL for this instance cluster network attachment. - - `id` - (Required, String) The unique identifier for this instance cluster network attachment. - - `name` - (Required, String) The name for this instance cluster network attachment. The name is unique across all network attachments for the instance. - - `resource_type` - (Required, String) The resource type. + - `name` - (Required, String) The name for this instance cluster network attachment. The name is unique across all network attachments for the instance. (`name` is a apply once attribute, changing it will not be detected by terraform) + - `cluster_network_interface` - (Required, List) The cluster network interface for this instance cluster network attachment. + + Nested schema for **cluster_network_interface**: + - `id` - (Required, String) The unique identifier for this cluster network interface. + - `name` - (Required, String) The name for this cluster network interface. The name is unique across all interfaces in the cluster network. + - `primary_ip` - (Required, List) The primary IP for this cluster network interface. + + Nested schema for **primary_ip**: + - `address` - (Required, String) The IP address.If the address is pending allocation, the value will be `0.0.0.0`.This property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) to support IPv6 addresses in the future. + - `deleted` - (Optional, List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. + + - `href` - (Required, String) The URL for this cluster network subnet reserved IP. + - `id` - (Required, String) The unique identifier for this cluster network subnet reserved IP. + - `name` - (Required, String) The name for this cluster network subnet reserved IP. The name is unique across all reserved IPs in a cluster network subnet. + - `resource_type` - (Computed, String) The resource type. + - `subnet` - (Required, List) + + Nested schema for **subnet**: + - `id` - (Required, String) The unique identifier for this cluster network subnet. + + ~> **Note:** + **•** `cluster_network_attachments` updation requires the instance to be in stopped state. Use `action` attribute or `ibm_is_instance_action` resource accordingly to stop/start the instance.
+ **•** Using cluster_network_attachments in `ibm_is_instance` and `ibm_is_instance_cluster_network_attachment` resource together would result in changes shown in both resources alternatively, use either of them or use meta lifecycle argument `ignore_changes` on `cluster_network_attachments`
- `confidential_compute_mode` - (Optional, String) The confidential compute mode to use for this virtual server instance.If unspecified, the default confidential compute mode from the profile will be used. **Constraints: Allowable values are: `disabled`, `sgx`** {Select Availability} @@ -870,6 +890,14 @@ In addition to all argument reference list, you can access the following attribu Nested schema for `deleted`: - `more_info` - (String) Link to documentation about deleted resources. +- `cluster_network_attachments` - (List) The cluster network attachments for this virtual server instance.The cluster network attachments are ordered for consistent instance configuration. + Nested schema for **cluster_network_attachments**: + - `href` - (String) The URL for this instance cluster network attachment. + - `id` - (String) The unique identifier for this instance cluster network attachment. + - `name` - (String) The name for this instance cluster network attachment. The name is unique across all network attachments for the instance. + - `resource_type` - (String) The resource type. + + - `cluster_network` - (List) If present, the cluster network that this virtual server instance resides in. Nested schema for **cluster_network**: - `crn` - (String) The CRN for this cluster network. diff --git a/website/docs/r/is_instance_cluster_network_attachment.html.markdown b/website/docs/r/is_instance_cluster_network_attachment.html.markdown index 15517fb9b6..517b99b41e 100644 --- a/website/docs/r/is_instance_cluster_network_attachment.html.markdown +++ b/website/docs/r/is_instance_cluster_network_attachment.html.markdown @@ -145,45 +145,31 @@ resource "ibm_is_instance_action" "is_instance_start_after" { You can specify the following arguments for this resource. + ~> **Note:** + **•** Instance cluster network attachment creation requires the instance to be in stopped state. Use `ibm_is_instance_action` resource accordingly to stop/start the instance.
+ **•** Using cluster_network_attachments in `ibm_is_instance` and `ibm_is_instance_cluster_network_attachment` resource together would result in changes shown in both resources alternatively, use either of them or use meta lifecycle argument `ignore_changes` on `ibm_is_instance` resource.
+ + - `before` - (Optional, List) The instance cluster network attachment that is immediately before. If absent, this is thelast instance cluster network attachment. Nested schema for **before**: - - `href` - (Required, String) The URL for this instance cluster network attachment. - `id` - (Required, String) The unique identifier for this instance cluster network attachment. - - `name` - (Computed, String) The name for this instance cluster network attachment. The name is unique across all network attachments for the instance. - - `resource_type` - (Computed, String) The resource type. - `cluster_network_interface` - (Required, List) The cluster network interface for this instance cluster network attachment. Nested schema for **cluster_network_interface**: - - `deleted` - (Optional, List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. - Nested schema for **deleted**: - - `more_info` - (Computed, String) Link to documentation about deleted resources. - - `href` - (Required, String) The URL for this cluster network interface. + - `id` - (Required, String) The unique identifier for this cluster network interface. - `name` - (Required, String) The name for this cluster network interface. The name is unique across all interfaces in the cluster network. - `primary_ip` - (Required, List) The primary IP for this cluster network interface. Nested schema for **primary_ip**: - `address` - (Required, String) The IP address.If the address is pending allocation, the value will be `0.0.0.0`.This property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) to support IPv6 addresses in the future. - - `deleted` - (Optional, List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. - - Nested schema for **deleted**: - - `more_info` - (Computed, String) Link to documentation about deleted resources. - - `href` - (Required, String) The URL for this cluster network subnet reserved IP. - `id` - (Required, String) The unique identifier for this cluster network subnet reserved IP. - `name` - (Required, String) The name for this cluster network subnet reserved IP. The name is unique across all reserved IPs in a cluster network subnet. - - `resource_type` - (Computed, String) The resource type. - - `resource_type` - (Computed, String) The resource type. - `subnet` - (Required, List) Nested schema for **subnet**: - - `deleted` - (Optional, List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. - - Nested schema for **deleted**: - - `more_info` - (Computed, String) Link to documentation about deleted resources. - - `href` - (Required, String) The URL for this cluster network subnet. - `id` - (Required, String) The unique identifier for this cluster network subnet. - - `name` - (Computed, String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network. - - `resource_type` - (Computed, String) The resource type. + - `instance_id` - (Required, Forces new resource, String) The virtual server instance identifier. - `name` - (Optional, String) The name for this instance cluster network attachment. The name is unique across all network attachments for the instance. @@ -191,16 +177,52 @@ You can specify the following arguments for this resource. After your resource is created, you can read values from the listed arguments and the following attributes. + - `id` - The unique identifier of the InstanceClusterNetworkAttachment. +- `before` - (List) The instance cluster network attachment that is immediately before. If absent, this is thelast instance cluster network attachment. + Nested schema for **before**: + - `href` - (String) The URL for this instance cluster network attachment. + - `id` - (String) The unique identifier for this instance cluster network attachment. + - `name` - (String) The name for this instance cluster network attachment. The name is unique across all network attachments for the instance. + - `resource_type` - (String) The resource type. +- `cluster_network_interface` - (List) The cluster network interface for this instance cluster network attachment. + Nested schema for **cluster_network_interface**: + - `deleted` - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. + Nested schema for **deleted**: + - `more_info` - (String) Link to documentation about deleted resources. + - `href` - (String) The URL for this cluster network interface. + - `id` - (String) The unique identifier for this cluster network interface. + - `name` - (String) The name for this cluster network interface. The name is unique across all interfaces in the cluster network. + - `primary_ip` - (List) The primary IP for this cluster network interface. + Nested schema for **primary_ip**: + - `address` - (String) The IP address.If the address is pending allocation, the value will be `0.0.0.0`.This property may [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) to support IPv6 addresses in the future. + - `deleted` - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. + + Nested schema for **deleted**: + - `more_info` - (String) Link to documentation about deleted resources. + - `href` - (String) The URL for this cluster network subnet reserved IP. + - `id` - (String) The unique identifier for this cluster network subnet reserved IP. + - `name` - (String) The name for this cluster network subnet reserved IP. The name is unique across all reserved IPs in a cluster network subnet. + - `resource_type` - (String) The resource type. + - `resource_type` - (String) The resource type. + - `subnet` - (List) + Nested schema for **subnet**: + - `deleted` - (List) If present, this property indicates the referenced resource has been deleted, and providessome supplementary information. + Nested schema for **deleted**: + - `more_info` - (String) Link to documentation about deleted resources. + - `href` - (String) The URL for this cluster network subnet. + - `id` - (String) The unique identifier for this cluster network subnet. + - `name` - (String) The name for this cluster network subnet. The name is unique across all cluster network subnets in the cluster network. + - `resource_type` - (String) The resource type. - `href` - (String) The URL for this instance cluster network attachment. - `instance_cluster_network_attachment_id` - (String) The unique identifier for this instance cluster network attachment. - `lifecycle_reasons` - (List) The reasons for the current `lifecycle_state` (if any). - Nested schema for **lifecycle_reasons**: - - `code` - (String) A reason code for this lifecycle state:- `internal_error`: internal error (contact IBM support)- `resource_suspended_by_provider`: The resource has been suspended (contact IBM support)The enumerated values for this property may[expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. Allowable values are: `internal_error`, `resource_suspended_by_provider`. + - `code` - (String) A reason code for this lifecycle state:- `internal_error`: internal error (contact IBM support)- `resource_suspended_by_provider`: The resource has been suspended (contact IBM support)The enumerated values for this property may[expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future. - `message` - (String) An explanation of the reason for this lifecycle state. - `more_info` - (String) Link to documentation about the reason for this lifecycle state. - `lifecycle_state` - (String) The lifecycle state of the instance cluster network attachment. Allowable values are: `deleting`, `failed`, `pending`, `stable`, `suspended`, `updating`, `waiting`. +- `name` - (String) The name for this instance cluster network attachment. The name is unique across all network attachments for the instance. - `resource_type` - (String) The resource type. Allowable values are: `instance_cluster_network_attachment`. diff --git a/website/docs/r/is_instance_template.html.markdown b/website/docs/r/is_instance_template.html.markdown index 23551255d2..19bb308704 100644 --- a/website/docs/r/is_instance_template.html.markdown +++ b/website/docs/r/is_instance_template.html.markdown @@ -283,27 +283,23 @@ Review the argument references that you can specify for your resource. Cluster Networks for VPC is available for select customers only. Contact IBM Support if you are interested in using this functionality. [About cluster networks](https://cloud.ibm.com/docs/vpc?topic=vpc-about-cluster-network) - `cluster_network_attachments` - (Optional, List) The cluster network attachments to create for this virtual server instance. A cluster network attachment represents a device that is connected to a cluster network. The number of network attachments must match one of the values from the instance profile's `cluster_network_attachment_count` before the instance can be started. - Nested schema for **cluster_network_attachments**: - - `cluster_network_interface` - (Required, List) A cluster network interface for the instance cluster network attachment. This can bespecified using an existing cluster network interface that does not already have a `target`,or a prototype object for a new cluster network interface.This instance must reside in the same VPC as the specified cluster network interface. Thecluster network interface must reside in the same cluster network as the`cluster_network_interface` of any other `cluster_network_attachments` for this instance. - Nested schema for **cluster_network_interface**: - - `auto_delete` - (Optional, Boolean) Indicates whether this cluster network interface will be automatically deleted when `target` is deleted. - - `href` - (Optional, String) The URL for this cluster network interface. - - `id` - (Optional, String) The unique identifier for this cluster network interface. - - `name` - (Optional, String) The name for this cluster network interface. The name must not be used by another interface in the cluster network. Names beginning with `ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words. - - `primary_ip` - (Optional, List) The primary IP address to bind to the cluster network interface. May be eithera cluster network subnet reserved IP identity, or a cluster network subnet reserved IPprototype object which will be used to create a new cluster network subnet reserved IP.If a cluster network subnet reserved IP identity is provided, the specified clusternetwork subnet reserved IP must be unbound.If a cluster network subnet reserved IP prototype object with an address is provided,the address must be available on the cluster network interface's cluster networksubnet. If no address is specified, an available address on the cluster network subnetwill be automatically selected and reserved. - - Nested schema for **primary_ip**: - - `address` - (Optional, String) The IP address to reserve, which must not already be reserved on the subnet.If unspecified, an available address on the subnet will automatically be selected. - - `auto_delete` - (Optional, Boolean) Indicates whether this cluster network subnet reserved IP member will be automatically deleted when either `target` is deleted, or the cluster network subnet reserved IP is unbound. - - `href` - (Optional, String) The URL for this cluster network subnet reserved IP. - - `id` - (Optional, String) The unique identifier for this cluster network subnet reserved IP. - - `name` - (Optional, String) The name for this cluster network subnet reserved IP. The name must not be used by another reserved IP in the cluster network subnet. Names starting with `ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words. - - `subnet` - (Optional, List) The associated cluster network subnet. Required if `primary_ip` does not specify acluster network subnet reserved IP identity. - - Nested schema for **subnet**: - - `href` - (Optional, String) The URL for this cluster network subnet. - - `id` - (Optional, String) The unique identifier for this cluster network subnet. - - `name` - (Optional, String) The name for this cluster network attachment. Names must be unique within the instance the cluster network attachment resides in. If unspecified, the name will be a hyphenated list of randomly-selected words. Names starting with `ibm-` are reserved for provider-owned resources, and are not allowed. + Nested schema for **cluster_network_attachments**: + - `cluster_network_interface` - (Required, List) A cluster network interface for the instance cluster network attachment. This can bespecified using an existing cluster network interface that does not already have a `target`,or a prototype object for a new cluster network interface.This instance must reside in the same VPC as the specified cluster network interface. Thecluster network interface must reside in the same cluster network as the`cluster_network_interface` of any other `cluster_network_attachments` for this instance. + Nested schema for **cluster_network_interface**: + + - `auto_delete` - (Optional, Boolean) Indicates whether this cluster network interface will be automatically deleted when `target` is deleted. + - `id` - (Optional, String) The unique identifier for this cluster network interface. + - `name` - (Optional, String) The name for this cluster network interface. The name must not be used by another interface in the cluster network. Names beginning with `ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words. + - `primary_ip` - (Optional, List) The primary IP address to bind to the cluster network interface. May be eithera cluster network subnet reserved IP identity, or a cluster network subnet reserved IPprototype object which will be used to create a new cluster network subnet reserved IP.If a cluster network subnet reserved IP identity is provided, the specified clusternetwork subnet reserved IP must be unbound.If a cluster network subnet reserved IP prototype object with an address is provided,the address must be available on the cluster network interface's cluster networksubnet. If no address is specified, an available address on the cluster network subnetwill be automatically selected and reserved. + + Nested schema for **primary_ip**: + - `auto_delete` - (Optional, Boolean) Indicates whether this cluster network subnet reserved IP member will be automatically deleted when either `target` is deleted, or the cluster network subnet reserved IP is unbound. + - `name` - (Optional, String) The name for this cluster network subnet reserved IP. The name must not be used by another reserved IP in the cluster network subnet. Names starting with `ibm-` are reserved for provider-owned resources, and are not allowed. If unspecified, the name will be a hyphenated list of randomly-selected words. + - `subnet` - (Optional, List) The associated cluster network subnet. Required if `primary_ip` does not specify acluster network subnet reserved IP identity. + + Nested schema for **subnet**: + - `id` - (Optional, String) The unique identifier for this cluster network subnet. + - `name` - (Optional, String) The name for this cluster network attachment. Names must be unique within the instance the cluster network attachment resides in. If unspecified, the name will be a hyphenated list of randomly-selected words. Names starting with `ibm-` are reserved for provider-owned resources, and are not allowed. - `confidential_compute_mode` - (Optional, String) The confidential compute mode to use for this virtual server instance.If unspecified, the default confidential compute mode from the profile will be used. **Constraints: Allowable values are: `disabled`, `sgx`** {Select Availability}