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

Add retries to resources #157

Open gabcoyne opened 2 months ago

gabcoyne commented 2 months ago

Community Note

Terraform Version

Terraform version – 1.7.5 Prefect provider version – 0.1.2

Affected Resource(s)

Terraform Configuration Files

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

provider "prefect" {
  account_id = var.prefect_account_id
  api_key    = data.aws_secretsmanager_secret_version.api_token.secret_string
}

resource "prefect_workspace" "this" {
 name  = var.name
  handle = lower(var.name)
}

Expected Behavior

In the event of failure to create by 429 or 5XX errors, add retries to bring resiliency across the board.

Actual Behavior

In this example a 503 was returned when attempting to create multiple workspaces at once

Steps to Reproduce

  1. terraform apply

Important Factoids

Discussed adding https://github.com/hashicorp/go-retryablehttp

taylor-curran commented 1 month ago

I have a plus one on this ticket from customer.