-
Notifications
You must be signed in to change notification settings - Fork 674
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
[Resource] [Datasource] Power add VSN functionality to datasources an… #5854
base: master
Are you sure you want to change the base?
Conversation
de3cf43
to
0274928
Compare
@@ -1703,6 +1816,12 @@ func createPVMInstance(d *schema.ResourceData, client *instance.IBMPIInstanceCli | |||
if tags, ok := d.GetOk(Arg_UserTags); ok { | |||
body.UserTags = flex.FlattenSet(tags.(*schema.Set)) | |||
} | |||
if vsn, ok := d.GetOk(Arg_VirtualSerialNumber); ok { | |||
vsnListType := vsn.([]interface{}) |
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.
Not sure why this is declared here and passed as a parameter to the func in next line?
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 needs to convert the list type (what terraform is taking) to a CreateServerVirtualSerialNumber
model to send to SB
0274928
to
7e91eb2
Compare
Description: "Description of virtual serial number.", | ||
Type: schema.TypeString, | ||
}, | ||
Attr_InstanceID: { |
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.
IMO this attr looks like redundant as it is same as Arg_InstanceID
isn't?
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 will be only when Arg_InstanceID
is supplied. However, it is needed whenever the argument is not supplied as it will be a list of virtual serial numbers with different values for InstanceID.
7e91eb2
to
4d5d6b9
Compare
Community Note
Relates OR Closes #0000
Output from acceptance testing:
pi_virtual_serial_number (d):
pi_virtual_serial_numbers (d):
pi_virtual_serial_number (r)
pi_instance (d)
pi_instances (d)
pi_instance (r)