Skip to content
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

Blocks Support: Add BlockDocument HTTP client + struct model #173

Closed
parkedwards opened this issue May 23, 2024 · 0 comments · Fixed by #178
Closed

Blocks Support: Add BlockDocument HTTP client + struct model #173

parkedwards opened this issue May 23, 2024 · 0 comments · Fixed by #178
Assignees

Comments

@parkedwards
Copy link
Contributor

parkedwards commented May 23, 2024

https://www.notion.so/prefect/Design-Block-support-in-the-Terraform-Provider-ae2ea25a18864de9b51b8aa06af9486b?pvs=4

A block_document is the actual API object that holds the user's value

Things we'll probably need:

  • api.BlockDocument (struct) - in internal/api (the API response object0
  • api.BlockDocumentCreateRequest
  • api.BlockDocumentUpdateRequest
  • BlockDocumentClient interface{}- in internal/client
  • func (c *BlockSchemaClient) Get(ctx context.Context, ID uuid.UUID) (*api.BlockDocument, error) - in internal/client
  • func (c *BlockSchemaClient) Create(ctx context.Context, payload *api.BlockDocumentCreateRequest) (*api.BlockDocument, error) - in internal/client
  • func (c *BlockSchemaClient) Update(ctx context.Context, ID uuid.UUID, payload *apiBlockDocumentUpdateRequest) (*api.BlockDocument, error) - in internal/client
  • func (c *BlockSchemaClient) Delete(ctx context.Context, ID uuid.UUID) (error) - in internal/client

note that we can also include a ?include_secrets=true query param, so that we can always hydrate the TF state with the actual value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant