Skip to content

Commit

Permalink
feat(id): add connection-secret cluster_id
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Paul Haar <[email protected]>
  • Loading branch information
Christopher Paul Haar committed Jun 23, 2023
1 parent d16db29 commit 71b3c59
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config/ekscluster/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,13 @@ func Configure(p *config.Provider) {
p.AddResourceConfigurator("castai_eks_cluster", func(r *config.Resource) {
r.ShortGroup = ""
r.Kind = "EksCluster"

r.Sensitive.AdditionalConnectionDetailsFn = func(attr map[string]any) (map[string][]byte, error) {
conn := map[string][]byte{}
if a, ok := attr["id"].(string); ok {
conn["attribute.cluster_id"] = []byte(a)
}
return conn, nil
}
})
}

0 comments on commit 71b3c59

Please sign in to comment.