Skip to content

Commit

Permalink
Merge pull request #602 from cloudflare/skip-zero-waiting-room-status
Browse files Browse the repository at this point in the history
generate: skip `queuing_status_code` attribute when 0
  • Loading branch information
jacobbednarz committed Aug 28, 2023
2 parents c7bc84b + 8060b96 commit fbd7e11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/app/cf-terraforming/cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,12 @@ func generateResources() func(cmd *cobra.Command, args []string) {
if err != nil {
log.Fatal(err)
}

for i := 0; i < resourceCount; i++ {
if jsonStructData[i].(map[string]interface{})["queueing_status_code"].(float64) == 0 {
jsonStructData[i].(map[string]interface{})["queueing_status_code"] = nil
}
}
case "cloudflare_workers_kv_namespace":
jsonPayload, _, err := api.ListWorkersKVNamespaces(context.Background(), identifier, cloudflare.ListWorkersKVNamespacesParams{})
if err != nil {
Expand Down

0 comments on commit fbd7e11

Please sign in to comment.