Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable deletion protection first
Browse files Browse the repository at this point in the history
jharley committed Aug 2, 2024
1 parent 78e7bad commit deaa16a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/provider/honeycombio_sweeper_test.go
Original file line number Diff line number Diff line change
@@ -57,6 +57,12 @@ func getEnvironmentSweeper(name string) *resource.Sweeper {
for _, e := range envs {
if strings.HasPrefix(e.Name, SweeperTargetPrefix) {
log.Printf("[DEBUG] deleting environment %s (%s)", e.Name, e.ID)
c.Environments.Update(ctx, &v2client.Environment{
ID: e.ID,
Settings: &v2client.EnvironmentSettings{
DeleteProtected: client.ToPtr(false),
},
})
err = c.Environments.Delete(ctx, e.ID)
if err != nil {
log.Printf("[ERROR] could not delete environment %s: %s", e.ID, err)

0 comments on commit deaa16a

Please sign in to comment.