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

Adds support for Tiered Caching #2101

Merged
merged 5 commits into from Dec 23, 2022

Conversation

iveelsm
Copy link
Contributor

@iveelsm iveelsm commented Dec 21, 2022

This adds support for manipulation, creating and deletion of tiered cache settings through the existing mechanisms in the Cloudflare API. This adds support for settings generic and smart tiered cache topologies through the terraform provider.

Implementation:

  • Create/Update, Delete and Get methods for Tiered Cache settings

Dependent on the merging of the cloudflare-go PR: cloudflare/cloudflare-go#1149

Once that PR is merged, this require additional updates to pull in the latest published version.

Closes #2100

@github-actions
Copy link
Contributor

github-actions bot commented Dec 21, 2022

changelog detected ✅

@jacobbednarz
Copy link
Member

couple of things:

  • you'll need to also add this to the provider.go (see Create Total TLS Resource #1979 for an example) for this to actually work. the acceptance tests will fail as is at the moment even if you shim in cloudflare-go as the resource isn't defined.
  • you can run make docs to generate the automatic documentation. this is also run on master merges but doing it now gives you a chance to check it all out before then.

other than that, looking good! i'll run the acceptance tests once the couple of things are addressed.

@iveelsm
Copy link
Contributor Author

iveelsm commented Dec 21, 2022

Word! Can do. I will probably get it fully ready once we merged the cloudflare-go PR.

@jacobbednarz
Copy link
Member

if you'd like to work on them together, there is the option of doing https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/contributing/development.md#pulling-in-unreleased-changes-from-go-library-cloudflare-go locally that allows you to get this 95% of the way there and just wait for the version bump to arrive in the mainline.

@iveelsm iveelsm force-pushed the mikey/tiered-cache branch 2 times, most recently from 5afa8f6 to 6697d85 Compare December 22, 2022 19:50
This adds support for manipulation, creating and deletion of tiered cache settings through the existing mechanisms in the Cloudflare API. This adds support for settings generic and smart tiered cache topologies through the terraform provider.

Implementation:

* Create/Update, Delete and Get methods for Tiered Cache settings
@jacobbednarz
Copy link
Member

acceptance tests all 🍏

TF_ACC=1 go test $(go list ./...) -v -run "^TestCloudflareTieredCache_" -count 1 -parallel 1 -timeout 120m -parallel 1
?   	github.com/cloudflare/terraform-provider-cloudflare	[no test files]
=== RUN   TestCloudflareTieredCache_Smart
--- PASS: TestCloudflareTieredCache_Smart (7.22s)
=== RUN   TestCloudflareTieredCache_Generic
--- PASS: TestCloudflareTieredCache_Generic (6.30s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/provider	13.956s

@jacobbednarz jacobbednarz merged commit fd90a59 into cloudflare:master Dec 23, 2022
@github-actions github-actions bot added this to the v3.31.0 milestone Dec 23, 2022
github-actions bot pushed a commit that referenced this pull request Dec 23, 2022
@github-actions
Copy link
Contributor

This functionality has been released in v3.31.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

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

Successfully merging this pull request may close these issues.

Add Support for Tiered Caching
2 participants