Skip to content

Commit

Permalink
Fix an issue with AWS exocompute customer supplied security groups (#168
Browse files Browse the repository at this point in the history
)

When creating the exocompute configuration, the supplied security
groups was checked to exist, but the boolean condition was inverted.
  • Loading branch information
johan3141592 authored May 3, 2024
1 parent 3694e62 commit 1200d55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/polaris/aws/exocompute.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ func Unmanaged(region, vpcID string, subnetIDs []string, clusterSecurityGroupID,
}

// Validate security groups.
if hasSecurityGroup(vpc, clusterSecurityGroupID) {
if !hasSecurityGroup(vpc, clusterSecurityGroupID) {
return aws.ExocomputeConfigCreate{},
fmt.Errorf("invalid cluster security group id: %v", clusterSecurityGroupID)
}
if hasSecurityGroup(vpc, nodeSecurityGroupID) {
if !hasSecurityGroup(vpc, nodeSecurityGroupID) {
return aws.ExocomputeConfigCreate{},
fmt.Errorf("invalid node security group id: %v", nodeSecurityGroupID)
}
Expand Down

0 comments on commit 1200d55

Please sign in to comment.