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

Change advertised_ip_ranges fields in google_compute_router_peer and google_compute_router resources to Sets #10118

Closed
Closed
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
2 changes: 1 addition & 1 deletion mmv1/products/compute/Router.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ properties:
This enum field has the one valid value: ALL_SUBNETS
item_type: Api::Type::String # TODO(#324): enum?
send_empty_value: true
- !ruby/object:Api::Type::Array
- !ruby/object:Api::Type::Set
name: advertisedIpRanges
Comment on lines -153 to 154
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is currently causing a build error - to specify a field as a Set in these yaml files you will need to revert it back to !ruby/object:Api::Type::Array and then add the property is_set: true to that field. However if you do that please refer to my previous review where making the change to a Set can only be in a major version.

description: |
User-specified list of individual IP ranges to advertise in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Leave this field blank to advertise no custom groups.`,
},
},
"advertised_ip_ranges": {
Type: schema.TypeList,
Type: schema.TypeSet,
Optional: true,
Description: `User-specified list of individual IP ranges to advertise in
custom mode. This field can only be populated if advertiseMode
Expand Down Expand Up @@ -1095,8 +1095,9 @@ func expandNestedComputeRouterBgpPeerAdvertisedGroups(v interface{}, d tpgresour
}

func expandNestedComputeRouterBgpPeerAdvertisedIpRanges(v interface{}, d tpgresource.TerraformResourceData, config *transport_tpg.Config) (interface{}, error) {
v = v.(*Schema.Set).List()
l := v.([]interface{})
req := make([]interface{}, 0, len(l))
req := make(map[string]interface{}, 0, len(l))
for _, raw := range l {
if raw == nil {
continue
Expand Down
Loading