Add static credentialstore datasource#489
Open
AdamBouhmad wants to merge 3 commits intohashicorp:mainfrom
Open
Add static credentialstore datasource#489AdamBouhmad wants to merge 3 commits intohashicorp:mainfrom
AdamBouhmad wants to merge 3 commits intohashicorp:mainfrom
Conversation
moduli
reviewed
Oct 23, 2023
|
|
||
| csl, err := client.List(ctx, scopeId, opts...) | ||
| if err != nil { | ||
| return diag.Errorf("error calling read static credential store: %v", err) |
Collaborator
There was a problem hiding this comment.
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.
Suggested change
| return diag.Errorf("error calling read static credential store: %v", err) | |
| return diag.Errorf("error calling list static credential store: %v", err) |
Comment on lines
+101
to
+102
| } | ||
| func setFromStaticCredentialStoreReadResponseMap(d *schema.ResourceData, raw map[string]interface{}, fromRead bool) error { |
Collaborator
There was a problem hiding this comment.
nit: newline
Suggested change
| } | |
| func setFromStaticCredentialStoreReadResponseMap(d *schema.ResourceData, raw map[string]interface{}, fromRead bool) error { | |
| } | |
| func setFromStaticCredentialStoreReadResponseMap(d *schema.ResourceData, raw map[string]interface{}, fromRead bool) error { |
Comment on lines
+44
to
+45
| } | ||
| func dataSourceCredentialStoreStaticRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { |
Collaborator
There was a problem hiding this comment.
nit: newline
Suggested change
| } | |
| func dataSourceCredentialStoreStaticRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { | |
| } | |
| func dataSourceCredentialStoreStaticRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { |
| DataSourcesMap: map[string]*schema.Resource{ | ||
| "boundary_scope": dataSourceScope(), | ||
| "boundary_scope": dataSourceScope(), | ||
| "boundary_credential_store_static": dataSourceCredentialStoreStatic(), |
Collaborator
There was a problem hiding this comment.
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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.