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

cloudflare_list items linking #4469

Open
3 tasks done
mcatany opened this issue Oct 29, 2024 · 5 comments · May be fixed by #4511
Open
3 tasks done

cloudflare_list items linking #4469

mcatany opened this issue Oct 29, 2024 · 5 comments · May be fixed by #4511
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. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log.

Comments

@mcatany
Copy link

mcatany commented Oct 29, 2024

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

root@docker-desktop:/# terraform -v
Terraform v1.9.8
on linux_amd64

Affected resource(s)

  • cloudflare_list
  • cloudflare_list_item

Terraform configuration files

resource "cloudflare_list" "exclude_from_maintenance" {
  account_id  = local.account_id
  name        = "exclude_from_maintenance"
  description = "Domain exclude from maintenance"
  kind        = "hostname"
}

resource "cloudflare_list" "maintenance" {

  account_id  = local.account_id
  name        = "maintenance_x"
  description = "Domain in current maintenance on x"
  kind        = "hostname"
}

resource "cloudflare_list_item" "static_asset" {

  account_id = local.account_id
  list_id    = cloudflare_list.exclude_from_maintenance.id
  hostname {
    url_hostname = "static.x"
  }
}

Link to debug output

https://gist.github.com/mcatany/c10cdc5d8775ce5c03ff0e70f1ec47d1

Panic output

No response

Expected output

15:08:44.297 STDOUT terraform: Plan: 0 to add, 0 to change, 0 to destroy.

Actual output

15:08:44.296 STDOUT terraform: Terraform will perform the following actions:
15:08:44.297 STDOUT terraform:   # cloudflare_list.exclude_from_maintenance will be updated in-place
15:08:44.297 STDOUT terraform:   ~ resource "cloudflare_list" "exclude_from_maintenance" {
15:08:44.297 STDOUT terraform:         id          = "baa3671e96b74232847f27cfe3ebfc92"
15:08:44.297 STDOUT terraform:         name        = "exclude_from_maintenance"
15:08:44.297 STDOUT terraform:         # (3 unchanged attributes hidden)
15:08:44.297 STDOUT terraform:       - item {
15:08:44.297 STDOUT terraform:           - value {
15:08:44.297 STDOUT terraform:               - hostname {
15:08:44.297 STDOUT terraform:                   - url_hostname = "static.hivebrite.com" -> null
15:08:44.297 STDOUT terraform:                 }
15:08:44.297 STDOUT terraform:             }
15:08:44.297 STDOUT terraform:         }
15:08:44.297 STDOUT terraform:       - item {
15:08:44.297 STDOUT terraform:           - value {
15:08:44.297 STDOUT terraform:               - hostname {
15:08:44.297 STDOUT terraform:                   - url_hostname = "static.hvbrt.com" -> null
15:08:44.297 STDOUT terraform:                 }
15:08:44.297 STDOUT terraform:             }
15:08:44.297 STDOUT terraform:         }
15:08:44.297 STDOUT terraform:     }
15:08:44.297 STDOUT terraform: Plan: 0 to add, 1 to change, 0 to destroy.

Steps to reproduce

terraform apply

Additional factoids

Everytime we apply this resources, the list of item shown as to be deleted. If we apply and proceed again, the list of items is shown to be added We tried to deleted all the resources /states/ etc and apply again but the problem is persisting.

References

No response

@mcatany mcatany 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 Oct 29, 2024
Copy link
Contributor

Terraform debug log detected ✅

@github-actions github-actions bot added the triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log. label Oct 29, 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.

Copy link
Contributor

Thank you for opening this issue and sorry to hear you're hitting issues. Unfortunately, the reproduction case provided contains HCL dynamic expressions. Examples of these are:

Maintainers don't accept these as reproduction cases since using these constructs and expressions can hold their own logic bugs which are outside of the provider and not able to be diagnosed.

For maintainers to triage this issue, we recommend providing a minimal reproduction test case that is only contains the impacted resources and can be easily reproduced in an isolated environment. Without providing this, maintainers are limited in what support they can provide.

@github-actions github-actions bot added triage/needs-information Indicates an issue needs more information in order to work on it. and removed triage/needs-information Indicates an issue needs more information in order to work on it. labels Oct 30, 2024
@simonsCatalyst
Copy link

simonsCatalyst commented Oct 30, 2024

I too have experienced this problem, I suspect this recent change my be related: #4228

The problem, at least for me, does not exist in version 4.43.0 but does exist in version 4.44.0 and 4.45.0

So we 'solved' it by downgrading to 4.43.0

@mbrekhov
Copy link

mbrekhov commented Nov 4, 2024

We have the same problem.
Also solved by downgrading to 4.43.0

@Cyb3r-Jak3 Cyb3r-Jak3 linked a pull request Nov 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants