Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Example usage of custom connection keys #119

Closed
wants to merge 3 commits into from
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
3 changes: 1 addition & 2 deletions cmd/provider/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/log/zap"

"github.com/crossplane-contrib/terrajet/pkg/config"
"github.com/crossplane-contrib/terrajet/pkg/terraform"

"github.com/crossplane-contrib/provider-tf-aws/apis"
Expand Down Expand Up @@ -67,7 +66,7 @@ func main() {
SyncPeriod: syncPeriod,
})
kingpin.FatalIfError(err, "Cannot create controller manager")
ws := terraform.NewWorkspaceStore(&config.Store, log)
ws := terraform.NewWorkspaceStore(log)
setup := clients.TerraformSetupBuilder(*terraformVersion, *providerSource, *providerVersion)

rl := ratelimiter.NewGlobal(ratelimiter.DefaultGlobalRPS)
Expand Down
12 changes: 12 additions & 0 deletions config/iam/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ func init() {
Type: "User",
},
},
Sensitive: config.Sensitive{
AdditionalConnectionDetailsFn: func(attr map[string]interface{}) (map[string][]byte, error) {
conn := map[string][]byte{}
if a, ok := attr["id"].(string); ok {
conn["aws_access_key_id"] = []byte(a)
}
if a, ok := attr["secret"].(string); ok {
conn["aws_secret_access_key"] = []byte(a)
}
return conn, nil
},
},
})

config.Store.SetForResource("aws_iam_group", config.Resource{
Expand Down
3 changes: 2 additions & 1 deletion internal/controller/autoscaling/attachment/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/controller/ebs/volume/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/controller/ec2/ec2launchtemplate/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/controller/ec2/ec2networkinterface/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions internal/controller/ec2/elasticip/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/controller/ec2/instance/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions internal/controller/ec2/route/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/controller/ec2/routetable/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/controller/ec2/securitygroup/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/controller/ec2/securitygrouprule/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/controller/ec2/subnet/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/controller/ec2/transitgateway/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/controller/ec2/transitgatewayroute/zz_controller.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading