The Cloudflare API response for ListAccessApplications seems to contain much more policy-related data than is necessary to generate the Terraform manifests, which only require the policy IDs. writeAttrLine panics on this data as it is of unexpected format.
This PR remaps the policy data to only keep the IDs of the policies associated with each application.
I have tested this locally, but have not added any unit tests as they seem to require API key access for specific zones/accounts for the regeneration part. Happy to add some if there's any guidelines on the process.
Fixes https://github.com/cloudflare/cf-terraforming/issues/734
The Cloudflare API response for
ListAccessApplications
seems to contain much more policy-related data than is necessary to generate the Terraform manifests, which only require the policy IDs.writeAttrLine
panics on this data as it is of unexpected format.This PR remaps the policy data to only keep the IDs of the policies associated with each application.
I have tested this locally, but have not added any unit tests as they seem to require API key access for specific zones/accounts for the regeneration part. Happy to add some if there's any guidelines on the process.