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

File share Mount target resource rename #4604

Merged
merged 8 commits into from
Jun 13, 2023

Conversation

deepaksibm
Copy link
Contributor

Deprecated ibm_is_share_target resource and datasources
Added ibm_is_share_mount_target

@deepaksibm
Copy link
Contributor Author


$ tfpt TestAccIbmIsShareMountTargetBasic
--- PASS: TestAccIbmIsShareMountTargetBasic (113.26s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc

@deepaksibm deepaksibm marked this pull request as draft June 1, 2023 20:00
@deepaksibm
Copy link
Contributor Author


$ tfpt TestAccIbmIsShareMountTarget
--- PASS: TestAccIbmIsShareMountTargetBasic (108.46s)
PASS
ok  	github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc	220.087s

@deepaksibm deepaksibm marked this pull request as ready for review June 1, 2023 20:15
return diag.FromErr(err)
}

d.SetId(fmt.Sprintf("%s/%s", *createShareMountTargetOptions.ShareID, *shareTarget.ID))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we setID before waitingfor available. If soemtimes waiting intermittely the state file will hold ID and helps in future run

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved above wait logic call

log.Printf("[DEBUG] GetShareMountTargetWithContext failed %s\n%s", err, response)
return diag.FromErr(err)
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we check shareTarget != nil and then access *shareTarget.X for eliminating nil pointer exception .
or Add in above

if err != nil || shareTarget = nil{

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added shareTarget == nil check

@deepaksibm
Copy link
Contributor Author

adding a fix. moving to draft till then

@deepaksibm deepaksibm marked this pull request as draft June 12, 2023 14:18
@deepaksibm deepaksibm marked this pull request as ready for review June 13, 2023 06:14
@deepaksibm
Copy link
Contributor Author

Fix added and tested. PR is ready to review and merge

@hkantare hkantare merged commit 8651619 into IBM-Cloud:master Jun 13, 2023
omaraibrahim pushed a commit to omaraibrahim/terraform-provider-ibm that referenced this pull request Jul 20, 2023
* Deprecated share target and added share mount target resources and data sources

* added maturity

* updated beta sdk version and removed custom sdk

* updated read methods

* pr review comments fix

* fix for concurrent target create and delete issue
@deepaksibm deepaksibm deleted the mount-target-rename branch September 5, 2023 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants