Skip to content

Conversation

@byron-oc
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented Jan 10, 2023

CLA assistant check
All committers have signed the CLA.

@byron-oc byron-oc requested a review from greg-oc January 10, 2023 16:22
Copy link
Contributor

@greg-oc greg-oc left a comment

Choose a reason for hiding this comment

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

LGTM, just one comment I'd like clarified

for i, region := range peering.Regions {
for j, vpcPeering := range region.VPCPeerings {
if vpcPeering.VPCCidr != nil {
peering.Regions[i].VPCPeerings[j].VPCCidrs = append(peering.Regions[i].VPCPeerings[j].VPCCidrs, vpcPeering.VPCCidr)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just checking, is there a chance that the api will have the same cidr return in both the VPCCidr and VPCCidrs fields? e.g.
VPCCidr = "0.0.0.0/0" and VPCCidrs - ["0.0.0.0/0"] ?

In this case this function would return
.VPCCidrs = ["0.0.0.0/0", "0.0.0.0/0"]

However I do think the API returns
VPCCidr = null if there are multiple VPCCidrs
OR
VPCCidr = and VPCCidrs = null if there is only one cidr

If the above is correct, then I think the function is perfect as is, otherwise it may need a check to avoid two duplicate CIDRs in the VPCCidrs field. Does that make sense?

Copy link
Contributor

Choose a reason for hiding this comment

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

@greg-oc I believe that's the case, as it wouldn't make sense to have both fields set 👍🏼

@bengesoff bengesoff merged commit 03fc67f into develop Jan 11, 2023
@bengesoff bengesoff deleted the aa_subscription branch January 11, 2023 14:08
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.

5 participants