PrefectHQ / terraform-provider-prefect

Terraform Provider for Prefect Cloud
https://registry.terraform.io/providers/PrefectHQ/prefect/latest/docs
Apache License 2.0
29 stars 13 forks source link

Support for block creation #126

Closed jpeeg closed 2 weeks ago

jpeeg commented 7 months ago

It would be really great if blocks could be created via Terraform. Currently we have various GCP service accounts we need prefect to use, which means we have to manually generate and download the key for each service account, create a prefect block, and paste the key in. We need to do this for many different service accounts across multiple workspaces.

A smoother alternative would be when we create the GCP service accounts in terraform we can also generate the keys and pass them as an input to e.g. a terraform module which is responsible for creating "GCP Credentials" blocks.

Thank you!

iotmani commented 7 months ago

Hey @desertaxle, do you want to take this ticket as per our earlier discussion? Or link it to an existing one if you have one.

taylor-curran commented 3 months ago

I have a plus one from a customer on this request.

youcandanch commented 2 months ago

Big +1 on this one, especially for credentialing. API seems to support it well, at least looking at the docs here: https://app.prefect.cloud/api/docs?deviceId=ef122781-5a78-432a-bf79-028df0ad6df2#tag/Block-documents/operation/create_block_document_api_accounts__account_id__workspaces__workspace_id__block_documents__post. Been looking for something to cut my teeth on here so I'll try to take a crack at it.

oieduardorabelo commented 1 month ago

any roadmap to support this feature?

i have a similar user case:

current solution is calling the prefect cloud rest api post-terraform apply

it works, but ideally, everything should be handled in terraform

mitchnielsen commented 1 month ago

👋🏼 Thanks everyone for reaching out. We're actively discussing this internally and deciding how best to implement it. We should have a more detailed update either this week or next.

mitchnielsen commented 1 month ago

We're starting to iterate on blocks support now 🎉 You can keep an eye on work by searching for "Blocks Support" issues.

mitchnielsen commented 3 weeks ago

Checking in: we've completed all of the issues we created for addressing Block support. We're going to do some more testing and dogfooding of this internally and will follow up when we cut a public release.

oieduardorabelo commented 3 weeks ago

that's amazing, thanks @mitchnielsen

i'll bring that up to our backlog asap

looking forward to REMOVE code 🚀

parkedwards commented 2 weeks ago

hey everyone - v2.0.0 is now released, which adds Blocks support to the Provider

https://registry.terraform.io/providers/PrefectHQ/prefect/latest/docs/resources/block