-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: interface {} is nil, not string #458
Comments
I'm also having this issue, @jmartin-eezy did you ever get this resolved? |
@nebriv unfortunately not. I ended up building a small golang client to retrieve cloudflare record IDs (which are not available from the dashboard at this time) so I could import records manually. That process is very tedious but didn't find a workaround. |
Hi! I've opened #638 to fix a similar issue, but based on the last comment, it sounds like the problem may be somewhere else. Could you check if setting environment variable |
It seems to have the same error.
|
Thanks @alphabet5! Based on your stack trace, the panic occurs here:
Currently, records on Secondary DNS zones don't have IDs (though we're planning to change that) and can't be managed through Terraform, simply because they also can't be changed through our API. If you'd still like to export them, that should work with This seems to work for me:
Alternatively, on one line:
However, the resulting resources would need to be renamed to avoid conflicts (normally we try to add IDs to the name to make them unique, but in the case of Secondary DNS we can't, and with this environment variable set, we don't try). Secondary DNS zones (#638) are the only zones that can have records without IDs, and we definitely want to improve that. Sorry for the inconvenience! |
I don't know what I did to screw that up, but it does work as expected now. Thanks @janik-cloudflare. |
Great :) Glad to hear it & happy to help! |
Confirmation
cf-terraforming version
v0.8.1
Expected outcome
cf-terraforming generate --token $TOKEN -z $ZONE --resource-type cloudflare_record > cf_import.tf
Expected it to output resources into my tf file.
Actual outcome
Steps to reproduce
Try to generate a cloudflare_record
References
No response
The text was updated successfully, but these errors were encountered: