-
Notifications
You must be signed in to change notification settings - Fork 139
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
Get latest cloudflare-go and update paginations #443
Conversation
52316ad
to
c22c787
Compare
- Add account_id to cloudflare_access_rule test resource - Add account_id to cloudflare_account_member test resource
c22c787
to
2e3800c
Compare
0a2f38f
to
e073f42
Compare
f571b36
to
f2a21cf
Compare
for future reference, there is automation that handles bumping versions (we shouldn't do it manually). it helps with things like OS dependencies and any version mismatches, see #445 for an example. as you've done the work here, we'll push forward with this one. |
be0826b
to
49cc609
Compare
the last failing validate step looks to be a conflict in the provider and output where not all fields are being exported. will need to dig in to the provider to see why that is. |
1a0fd9b
to
1bd5ecb
Compare
1bd5ecb
to
1040714
Compare
There are some inconsistencies here. The example response published by the doc seems to be outdated: https://api.cloudflare.com/#certificate-packs-list-certificate-packs I run a query against https://api.cloudflare.com/client/v4/zones/{zone_id}/ssl/certificate_packs I wonder what should be my next action with this situation. |
Triggered by cloudflare/cf-terraforming#443 validation mismatches, I went ahead and updated `CertificatePacks` to only reference ACM configuration now that dedicated custom/custom certificates are no more.
there are a couple of things here to address this. the first is that
the issue looks to be that we are marshaling alternatively, you could try manually mapping the values using something like https://github.com/tidwall/gjson however that seems really error prone instead of fixing this correctly in the underlying Go library. |
I'm in no rush merging this, so I'll just wait for cloudflare/cloudflare-go#1032 :) |
@jacobbednarz I updated cloudflare-go to 47, and it looks like one of the test Not sure though if this was the case in cloudflare-go 46 as well. I will look into this more later. |
if you track this down, let me know and we can cut a hotfix in cloudflare-go if needed. this was fine in the test suite but yet to run the full acceptance test suite in terraform. |
@jacobbednarz so looking a bit deeper into I found that cf-tf test is failing because We have mocked the API call: https://api.cloudflare.com/client/v4/zones/0da42c8d2132a9ddaf714f9e7c920711/rulesets I'm curious how should that look like? |
4579575
to
1e46fdc
Compare
fwiw, both cloudflare-go and the entire terraform provider test suites aren't seeing issues so it looks like we're doing something in this library (possibly VCR related as you mentioned above). will have a look into this one for you. |
Updating cloudflare-go to v0.46.0 and use paginated APIs for filter, firewall-rule and rate-limit resources.
Furthermore, I had to fix the following test tf resources to make go test work:
Related issue cloudflare/terraform-provider-cloudflare#1819 about:
I'm also a bit puzzled, why go vet is failing during test action.
@jacobbednarz I'd like to ask your guidance on the failing terraform validate step for certificate_authority resource. I see that the test resource doesn't reflect the tf resource: https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/certificate_pack
And I also can't align the new tf resource to the actual API response at: https://api.cloudflare.com/client/v4/zones/1fa53a4819fe128dd98be7df45ec7cc6/ssl/certificate_packs?status=all
Furthermore, it looks like the
filter
andfirewall_rules
APIs with the pagination updates are calling public API endpoints twice. This PR is aiming to fix that: cloudflare/cloudflare-go#1012