PrefectHQ / terraform-provider-prefect

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

Blocks Support: Create `prefect_block` resource - Update() #182

Closed parkedwards closed 3 months ago

parkedwards commented 4 months ago

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

resource "prefect_block" "datadog_api_key" {
    name = "datadog-api-key"
    type = "secret"
    data = jsonencode({
        value = var.datadog_api_key
    })
}

Located in internal/provider/resources/block.go

We'll need to add a Update() method on the pointer receiver for the BlockResource struct.

Afterwards we should be able to: update the data value in an existing block, eg. like in a key rotation scenario.

mitchnielsen commented 3 months ago

We moved things around, so the branch name from https://github.com/PrefectHQ/terraform-provider-prefect/commit/0b1fb3d71d6596f7ed4841c55a08b38bae7e47e0 should no longer closet his one. Reopened.

mitchnielsen commented 3 months ago

Will wait for https://github.com/PrefectHQ/terraform-provider-prefect/issues/174 before tackling this one.