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

Incorrectly reported deprecated resource when cloudflare_workers_cron_trigger resource is used #4118

Closed
3 tasks done
stankolubomir opened this issue Sep 24, 2024 · 2 comments · Fixed by #4295
Closed
3 tasks done
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Milestone

Comments

@stankolubomir
Copy link
Contributor

Confirmation

  • This is a bug with an existing resource and is not a feature request or enhancement. Feature requests should be submitted with Cloudflare Support or your account team.
  • I have searched the issue tracker and my issue isn't already found.
  • I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

Terraform v1.9.5
Cloudflare provider 4.42.0

Affected resource(s)

cloudflare_workers_cron_trigger

Terraform configuration files

resource "cloudflare_workers_cron_trigger" "default" {
  account_id  = "your-account-id"
  script_name = "example-name"
  schedules   = [
    "0 * * * *",
    "1 * * * *",
    "2 * * * *",
  ]
}

Link to debug output

https://gist.github.com/stankolubomir/937ae55a418347069581b14267328049

Panic output

No response

Expected output

No changes. Your infrastructure matches the configuration.

Actual output

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

│ Warning: Deprecated Resource

│ with module.worker_script.cloudflare_workers_cron_trigger.default,
│ on ../../../modules/cf/cloudflare-worker/main.tf line 59, in resource "cloudflare_workers_cron_trigger" "default":
│ 59: resource "cloudflare_workers_cron_trigger" "default" {

cloudflare_worker_cron_trigger is now deprecated and will be removed in the next major version. Use cloudflare_workers_cron_trigger instead.

│ (and one more similar warning elsewhere)

Steps to reproduce

Just run terraform plan or apply.

Additional factoids

Here is the faulty line in code: https://github.com/cloudflare/terraform-provider-cloudflare/blob/96d6cbf6ddb631095789c22afd49f88833957eeb/internal/sdkv2provider/resource_cloudflare_workers_cron_trigger.go#L35C6-L35C42

There is:
func resourceCloudflareWorkersCronTrigger() *schema.Resource {
should be:
func resourceCloudflareWorkerCronTrigger() *schema.Resource {

References

Issue was introduced by #3500

@stankolubomir stankolubomir added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 24, 2024
Copy link
Contributor

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

stankolubomir added a commit to stankolubomir/terraform-provider-cloudflare that referenced this issue Oct 17, 2024
jacobbednarz added a commit that referenced this issue Oct 17, 2024
ref #4118 Fix to display deprecation message for cloudflare_worker_cron_trigger resource correctly
@github-actions github-actions bot added this to the v4.45.0 milestone Oct 17, 2024
Copy link
Contributor

This functionality has been released in v4.45.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!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
1 participant