Skip to content

Commit

Permalink
Fixed AWS KMS normalization (#1018)
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-karpukhin authored Jun 29, 2023
1 parent 443b1cf commit 2592e19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/controller/atlasproject/encryption_at_rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ func syncEncryptionAtRestsInAtlas(ctx *workflow.Context, projectID string, proje
}

func normalizeAwsKms(ctx *workflow.Context, projectID string, awsKms *mongodbatlas.AwsKms) error {
if awsKms == nil || awsKms.Enabled == nil || !*awsKms.Enabled {
return nil
}

// verify if role ID is set as AtlasObjectID
matched, err := regexp.MatchString(ObjectIDRegex, awsKms.RoleID)
if err != nil {
Expand Down

0 comments on commit 2592e19

Please sign in to comment.