diff --git a/vercel/resource_access_group_test.go b/vercel/resource_access_group_test.go index a051a506..7a6ede42 100644 --- a/vercel/resource_access_group_test.go +++ b/vercel/resource_access_group_test.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "testing" + "time" "github.com/hashicorp/terraform-plugin-testing/helper/acctest" "github.com/hashicorp/terraform-plugin-testing/helper/resource" @@ -94,6 +95,10 @@ func testCheckAccessGroupDoesNotExist(n string) resource.TestCheckFunc { return fmt.Errorf("no ID is set") } + // The access group is deleted asynchronously, so it's eventually consistent. Work around this by sleepin a + // small amount of time. + time.Sleep(time.Second * 2) + _, err := testClient().GetAccessGroup(context.TODO(), client.GetAccessGroupRequest{ TeamID: testTeam(), AccessGroupID: rs.Primary.ID,