Skip to content
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

Update outdated Cloudflare provider & resource #51

Merged

Conversation

outime
Copy link
Contributor

@outime outime commented Oct 1, 2019

This makes Cloudflare provider to work again but now users need to provide the zone ID as specified in https://www.terraform.io/docs/providers/cloudflare/r/record.html. Docs updated accordingly.

Just tested it and works fine :)

Fix #50

@pstadler
Copy link
Member

pstadler commented Oct 2, 2019

Thanks for you PR. I'm wondering whether cloudflare_zone could be used to retrieve an existing zone and its id. Could you verify this?

@outime
Copy link
Contributor Author

outime commented Oct 4, 2019

@pstadler of course! It's now updated.

main.tf Outdated
domain = "${var.domain}"
zone_id = "${var.cloudflare_zone_id}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be deleted now, no longer used.

@pstadler
Copy link
Member

pstadler commented Oct 4, 2019

Please check my comment and also change export TF_VAR_cloudflare_token=<token> to export TF_VAR_cloudflare_api_token=<token> in README.md

@outime outime force-pushed the update-cloudflare-arguments-issue-50 branch from dff78c4 to 371c710 Compare October 5, 2019 06:57
@outime
Copy link
Contributor Author

outime commented Oct 5, 2019

@pstadler README was already updated :) but otherwise all is now fixed, re-tested & squashed.

@pstadler
Copy link
Member

pstadler commented Oct 5, 2019

Great! Thanks a lot 🍻

@pstadler pstadler merged commit 5a852c2 into hobby-kube:master Oct 5, 2019
@mweibel
Copy link

mweibel commented Nov 4, 2019

I think this is at least partially wrong.
According to https://www.terraform.io/docs/providers/cloudflare/guides/version-2-upgrade.html it should be called "api_key" and not "api_token". Are you sure this works @outime?

@outime
Copy link
Contributor Author

outime commented Nov 5, 2019

@mweibel I can say that I ran it from scratch and it worked back then at least :)

There's a possibility that I just realized and is that the PR was opened just one day after v2 was released (and there's no version enforcement for this provider) so there's a possibility that I was using v1 when I was working on it. If the problem is really related to v1->v2 transition it should then be easy to fix by following the guide.

@pstadler
Copy link
Member

pstadler commented Nov 5, 2019

@mweibel
Copy link

mweibel commented Nov 5, 2019

Thanks @outime!

@pstadler I tested it and it didn't work for me. That's why I'm asking ;) Same error as #54 (upgrade didn't help). Only changing api_token to api_key works. However it might be that I use an older version of what you get nowadays from cloudflare as the API token.. This I didn't try.

@pstadler
Copy link
Member

pstadler commented Nov 5, 2019

Ah right, this is a newly introduced (?) API Token. Sorry for the confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Some Cloudflare provider / resources arguments are outdated
3 participants