Skip to content

Commit

Permalink
added endpoint and arn to docdb cluster secret
Browse files Browse the repository at this point in the history
Signed-off-by: ahmedali6 <[email protected]>
  • Loading branch information
ahmedali6 committed Nov 3, 2023
1 parent 83e4b2b commit 9c815c1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/docdb/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ func Configure(p *config.Provider) {
p.AddResourceConfigurator("aws_docdb_cluster", func(r *config.Resource) {
config.MoveToStatus(r.TerraformResource, "cluster_members")
r.UseAsync = true
r.Sensitive.AdditionalConnectionDetailsFn = func(attr map[string]any) (map[string][]byte, error) {
conn := map[string][]byte{}
if a, ok := attr["endpoint"].(string); ok {
conn["endpoint"] = []byte(a)
}
if a, ok := attr["arn"].(string); ok {
conn["arn"] = []byte(a)
}
return conn, nil
}
})

p.AddResourceConfigurator("aws_docdb_cluster_instance", func(r *config.Resource) {
Expand Down

0 comments on commit 9c815c1

Please sign in to comment.