Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(share-operations) : File shares operations and doc fixes #5139

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions ibm/service/vpc/resource_ibm_is_share_replica_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,7 @@ func resourceIbmIsShareReplicaOperationsCreate(context context.Context, d *schem
share_id := d.Get("share_replica").(string)

splitShare := d.Get("split_share").(bool)
getShareSourceOptions := &vpcv1.GetShareSourceOptions{
ShareID: &share_id,
}

sourceShare, response, err := vpcClient.GetShareSourceWithContext(context, getShareSourceOptions)
if err != nil || sourceShare == nil {
if response != nil {
if response.StatusCode == 404 {
d.SetId("")
}
log.Printf("[DEBUG] GetShareWithContext failed %s\n%s", err, response)
return nil
}
log.Printf("[DEBUG] GetShareWithContext failed %s\n", err)
return diag.FromErr(fmt.Errorf("[DEBUG] GetShareWithContext failed %s\n", err))
}
if !splitShare {
fallback_policy := d.Get("fallback_policy").(string)
timeout := d.Get("timeout").(int)
Expand Down Expand Up @@ -142,10 +127,6 @@ func resourceIbmIsShareReplicaOperationsCreate(context context.Context, d *schem
if err != nil {
return diag.FromErr(err)
}
_, err = isWaitForShareReplicationJobDone(context, vpcClient, *sourceShare.ID, d, d.Timeout(schema.TimeoutCreate))
if err != nil {
return diag.FromErr(err)
}
d.SetId(share_id)
return nil
}
Expand Down
6 changes: 3 additions & 3 deletions website/docs/d/is_source_share.html.markdown
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
layout: "ibm"
page_title: "IBM : is_share"
page_title: "IBM : is_source_share"
description: |-
Get information about Share
subcategory: "VPC infrastructure"
---

# ibm\_is_share
# ibm_is_source_share

Provides a read-only data source for Share. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.
Provides a read-only data source for the source share. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

## Example Usage

Expand Down
5 changes: 2 additions & 3 deletions website/docs/r/is_share_replica_operations.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ description: |-
subcategory: "VPC infrastructure"
---

# ibm\_is_share_target
# is_share_replica_operations

Provides a resource for ShareTarget. This allows ShareTarget to be created, updated and deleted.
Provides a resource for managing the share operations failover and split.

~> **NOTE**
`ibm_is_share_replica_operations` is used for either failing over to replica share or splitting the source and replica shares.
Expand Down Expand Up @@ -67,7 +67,6 @@ The following arguments are supported:
- `split_share` - (Boolean, string) If set to true the replication relationship between source share and replica will be removed.

~>**Note**

`split_share` and `fallback_policy` are mutually exclusive

## Attribute Reference
Expand Down
Loading