Skip to content

Commit

Permalink
fix(efs): move kms key id reference to efs
Browse files Browse the repository at this point in the history
  • Loading branch information
gadiener committed Jul 20, 2023
1 parent 1a38ff6 commit 439508b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
13 changes: 12 additions & 1 deletion config/efs/config.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package efs

import "github.com/upbound/upjet/pkg/config"
import (
"github.com/upbound/upjet/pkg/config"

"github.com/upbound/provider-aws/config/common"
)

// Configure adds configurations for efs group.
func Configure(p *config.Provider) {
Expand Down Expand Up @@ -36,4 +40,11 @@ func Configure(p *config.Provider) {
Type: "FileSystem",
}
})

p.AddResourceConfigurator("aws_efs_file_system", func(r *config.Resource) {
r.References["kms_key_id"] = config.Reference{
Type: "github.com/upbound/provider-aws/apis/kms/v1beta1.Key",
Extractor: common.PathARNExtractor,
}
})
}
7 changes: 0 additions & 7 deletions config/kms/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,6 @@ func Configure(p *config.Provider) {
}
})

p.AddResourceConfigurator("aws_efs_file_system", func(r *config.Resource) {
r.References["kms_key_id"] = config.Reference{
Type: "github.com/upbound/provider-aws/apis/kms/v1beta1.Key",
Extractor: common.PathARNExtractor,
}
})

p.AddResourceConfigurator("aws_kms_replica_key", func(r *config.Resource) {
r.References["primary_key_arn"] = config.Reference{
Type: "Key",
Expand Down

0 comments on commit 439508b

Please sign in to comment.