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

feat(blocks): add create/delete/import resource operations #196

Closed parkedwards closed 3 weeks ago

parkedwards commented 4 weeks ago

resolves https://github.com/PrefectHQ/terraform-provider-prefect/issues/174 relates to https://github.com/PrefectHQ/terraform-provider-prefect/issues/183 <- added some initial tests and example docs

Testing

terraform {
  required_providers {
    prefect = {
      source = "prefecthq/prefect"
    }
  }
}

provider "prefect" {
  endpoint = "https://api.prefect.dev"
  account_id = <id>
  api_key    = <key>
}

resource "prefect_block" "secret" {
  name      = "foo"
  type_slug = "secret"

  data = jsonencode({
    "value" : "bar"
  })

  workspace_id = <id>
}
terraform apply --auto-approve

terraform plan

terraform destroy --auto-approve
mitchnielsen commented 3 weeks ago

Was able to replicate the testing, as well as running terraform plan in between so it read the current state and reported no changes to make ✅