-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add static credentialstore datasource #489
base: main
Are you sure you want to change the base?
Add static credentialstore datasource #489
Conversation
|
||
csl, err := client.List(ctx, scopeId, opts...) | ||
if err != nil { | ||
return diag.Errorf("error calling read static credential store: %v", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we're technically listing here instead of reading. I do see that's the message we have for scopes
. We may want to modify that one.
return diag.Errorf("error calling read static credential store: %v", err) | |
return diag.Errorf("error calling list static credential store: %v", err) |
} | ||
func setFromStaticCredentialStoreReadResponseMap(d *schema.ResourceData, raw map[string]interface{}, fromRead bool) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: newline
} | |
func setFromStaticCredentialStoreReadResponseMap(d *schema.ResourceData, raw map[string]interface{}, fromRead bool) error { | |
} | |
func setFromStaticCredentialStoreReadResponseMap(d *schema.ResourceData, raw map[string]interface{}, fromRead bool) error { |
} | ||
func dataSourceCredentialStoreStaticRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: newline
} | |
func dataSourceCredentialStoreStaticRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { | |
} | |
func dataSourceCredentialStoreStaticRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { |
@@ -128,7 +128,8 @@ func New() *schema.Provider { | |||
"boundary_worker": resourceWorker(), | |||
}, | |||
DataSourcesMap: map[string]*schema.Resource{ | |||
"boundary_scope": dataSourceScope(), | |||
"boundary_scope": dataSourceScope(), | |||
"boundary_credential_store_static": dataSourceCredentialStoreStatic(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I follow how to break down these resources. What's the reason for creating a specific boundary_credential_store_static
data source as opposed to a boundary_credential_store
one?
Inspired by @grantorchard's scope datasource PR, I put together a first pass for the static cred store. Still needing to write tests & add documentation.
The static cred store datasource currently will allow the discovery of the resource by it's name, and will additionally return back the description of the resource.