Skip to content

Commit

Permalink
generate: skip queuing_status_code attribute when 0
Browse files Browse the repository at this point in the history
This is unusable in the API so it shouldn't be outputted.
  • Loading branch information
jacobbednarz committed Aug 28, 2023
1 parent d4d9cdc commit f5b1f0e
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"] == 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 f5b1f0e

Please sign in to comment.