Closed parkedwards closed 4 months ago
https://www.notion.so/prefect/Design-Block-support-in-the-Terraform-Provider-ae2ea25a18864de9b51b8aa06af9486b?pvs=4
In order to create a Block, we need a block_type.id and a block_schema.id. So we'll want an HTTP client for block_type, so we can fetch one
block_type.id
block_schema.id
block_type
Things we'll probably need:
api.BlockType
BlockTypeClient interface{}
func (c *BlockTypeClient) GetBySlug(ctx context.Context, slug string) (*api.BlockType, error)
https://app.prefect.cloud/api/docs#tag/Block-types/operation/read_block_type_by_slug_api_accounts__account_id__workspaces__workspace_id__block_types_slug__slug__get
https://www.notion.so/prefect/Design-Block-support-in-the-Terraform-Provider-ae2ea25a18864de9b51b8aa06af9486b?pvs=4
In order to create a Block, we need a
block_type.id
and ablock_schema.id
. So we'll want an HTTP client forblock_type
, so we can fetch oneThings we'll probably need:
api.BlockType
(struct) - in internal/apiBlockTypeClient interface{}
- in internal/clientfunc (c *BlockTypeClient) GetBySlug(ctx context.Context, slug string) (*api.BlockType, error)
- in internal/clienthttps://app.prefect.cloud/api/docs#tag/Block-types/operation/read_block_type_by_slug_api_accounts__account_id__workspaces__workspace_id__block_types_slug__slug__get