-
Notifications
You must be signed in to change notification settings - Fork 9
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
40 enhancement netapp ontap storage snapshot policy need to support import #105
40 enhancement netapp ontap storage snapshot policy need to support import #105
Conversation
### Terraform Import | ||
For example | ||
```shell | ||
terraform import netapp-ontap_storage_snapshot_policy_resource.example exp1,svm1,cluster4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"exp1" might confuse people. Maybe use something like "policy1" or "snp_policy1"
```terraform | ||
import { | ||
to = netapp-ontap_storage_snapshot_policy_resource.exp_import | ||
id = "exp1,svm1,cluster4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as here "exp1" seems not really represent as the snapshot policy name (line 107 & 108)
```terraform | ||
# __generated__ by Terraform | ||
# Please review these resources and move them into your main configuration files. | ||
# __generated__ by Terraform from "exp1,svm1,cluster4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as these lines 119, 120, 122
ImportState: true, | ||
ImportStateId: fmt.Sprintf("%s,%s,%s", "tfimportpolicy", "automation", "cluster4"), | ||
Check: resource.ComposeTestCheckFunc( | ||
resource.TestCheckResourceAttr("netapp-ontap_protocols_nfs_export_policy_resource.example", "name", "tfimportpolicy"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the resource address is not about storage policy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check the comments and update them.
…age_snapshot_policy-need-to-support-import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more small change.
First create the block | ||
```terraform | ||
import { | ||
to = netapp-ontap_storage_snapshot_policy_resource.exp_import |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not match the example in line 120 (exp_import vs policy1_import)
No description provided.