-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_netapp_volume - support mount_ip_addresses #5526
Changes from 5 commits
f810b05
f607b5f
b79415e
eaaf155
c27bf6c
3e43f53
566602b
0a28add
372438f
ff0e09a
d076ce3
367f3ce
84e02a9
70f7012
81f1171
1ca3640
10c4129
db409de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -388,3 +388,23 @@ func flattenArmNetAppVolumeExportPolicyRule(input *netapp.VolumePropertiesExport | |||||
|
||||||
return results | ||||||
} | ||||||
|
||||||
func flattenArmNetAppVolumeMountTargets(input interface{}) []interface{} { | ||||||
results := make([]interface{}, 0) | ||||||
if input == nil { | ||||||
return results | ||||||
} | ||||||
|
||||||
for _, item := range input.([]interface{}) { | ||||||
if item != nil { | ||||||
v := item.(map[string]interface{}) | ||||||
ipAddress := v["ipAddress"] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this needs to be:
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It cannot be updated to "ip_address" since api returns ""mountTargets":[{"provisioningState":"Succeeded","ipAddress":"10.0.2.4"}]" for property mountTargets. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah so this nested object isn't modelled as an object in the Swagger? in which case can we send a PR to the Swagger repo to fix that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When it comes to |
||||||
|
||||||
results = append(results, map[string]interface{}{ | ||||||
"ip_address": ipAddress, | ||||||
}) | ||||||
} | ||||||
} | ||||||
|
||||||
return results | ||||||
} |
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.
this needs to be a TypeList if it's a Computed field else it's not easily indexable - however - what are the mount targets here, a list of IP Addresses which should be used to mount the volume? If so it's likely this'd make more sense as a list of strings being
mount_ip_addresses
?can we also update the test to confirm this field is correctly set
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.
Fixed