hobby-kube / provisioning

Kubernetes cluster provisioning using Terraform.
https://hobby-kube.dev/guide
MIT License
312 stars 112 forks source link

Update outdated Cloudflare provider & resource #51

Closed outime closed 5 years ago

outime commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

@pstadler of course! It's now updated.

pstadler commented 5 years ago

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 commented 5 years ago

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

pstadler commented 5 years ago

Great! Thanks a lot 🍻

mweibel commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

It works. I tested it. See https://www.terraform.io/docs/providers/cloudflare/index.html#argument-reference

mweibel commented 4 years ago

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 commented 4 years ago

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