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_teams_list not updating items_with_description #4119

Closed
3 tasks done
diplatis opened this issue Sep 24, 2024 · 6 comments · Fixed by #4477
Closed
3 tasks done

cloudflare_teams_list not updating items_with_description #4119

diplatis opened this issue Sep 24, 2024 · 6 comments · Fixed by #4477
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@diplatis
Copy link

diplatis commented Sep 24, 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

Terraform 1.6.6
Cloudflare provider 4.40.0

Affected resource(s)

cloudflare_teams_list

Terraform configuration files

resource "cloudflare_teams_list" "byod_devices_new" {
  account_id  = var.cloudflare_account_id
  name        = "BYOD devices with comments"
  type        = "SERIAL"
  description = "Serial numbers for all BYOD onboarded devices."
  items_with_description = [
    {
      value       = "XSJSAASD"
      description = "Device 1"
    },
    {
      value       = "UINLNLLN"
      description = "Device 2"
    },
    {
      value       = "RYWEUEUW"
      description = "Device 3"
    }
  ]
}

Link to debug output

Panic output

No response

Expected output


Actual output

cloudflare_zero_trust_list.byod_devices_new: Refreshing state... [id=7a3a0d70-1ef0-46e0-9264-9898ffa9e219]
2024-09-26T08:58:50.284Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: 2024/09/26 08:58:50 
2024-09-26T08:58:50.284Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: GET /client/v4/accounts/***/gateway/lists/7a3a0d70-1ef0-46e0-9264-9898ffa9e219 HTTP/1.1
2024-09-26T08:58:50.284Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Host: api.cloudflare.com
2024-09-26T08:58:50.284Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: User-Agent: terraform-provider-cloudflare/4.42.0 terraform-plugin-sdk/2.34.0 terraform/1.6.6
2024-09-26T08:58:50.284Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Authorization: ***
2024-09-26T08:58:50.284Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Content-Type: application/json
2024-09-26T08:58:50.284Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Accept-Encoding: gzip
2024-09-26T08:58:50.284Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: 2024/09/26 08:58:50 
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: HTTP/2.0 200 OK
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Cf-Auditlog-Id: 01922d8d-f24f-7d07-8a62-f1e34efd1503
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Cf-Cache-Status: DYNAMIC
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Cf-Ray: 8c920df06ea96813-SEA
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Content-Type: application/json; charset=UTF-8
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Date: Thu, 26 Sep 2024 08:58:50 GMT
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Server: cloudflare
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Set-Cookie: __cflb=0H28vgHxwvgAQtjUGUFqYFDiSDreGJnV3fFLYxoLeey; SameSite=Lax; path=/; expires=Thu, 26-Sep-24 11:28:51 GMT; HttpOnly
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Set-Cookie: __cf_bm=e5yY6spMnhS3qNdovGNmvFbfaGoY8nB0mJYKGOfrK1g-1727341130-1.0.1.1-lbnBc1_3.fiQ9TKZtlLrsMM3JIx7xrZ04Rz6PwfeXBnd7H0SzYpJNf8zkA5IHsdR7jRSxlSO1W88InQZHGcMUg; path=/; expires=Thu, 26-Sep-24 09:28:50 GMT; domain=.api.cloudflare.com; HttpOnly; Secure; SameSite=None
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Set-Cookie: __cfruid=dd1c1db9578fc640dba4e216251e14831253e5c0-1727341130; path=/; domain=.api.cloudflare.com; HttpOnly; Secure; SameSite=None
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Vary: Accept-Encoding
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: {
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:   "result": {
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     "id": "7a3a0d70-1ef0-46e0-9264-9898ffa9e219",
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     "name": "BYOD devices with comments",
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     "description": "Serial numbers for all BYOD onboarded devices.",
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     "type": "SERIAL",
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     "created_at": "2024-09-20T13:10:23Z",
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     "updated_at": "2024-09-26T08:53:23Z",
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     "count": 8
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:   },
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:   "success": true,
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:   "errors": [],
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:   "messages": []
2024-09-26T08:58:50.446Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: }
2024-09-26T08:58:50.535Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: 2024/09/26 08:58:50 
2024-09-26T08:58:50.535Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: GET /client/v4/accounts/***/gateway/lists/7a3a0d70-1ef0-46e0-9264-9898ffa9e219/items?page=1&per_page=50 HTTP/1.1
2024-09-26T08:58:50.535Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Host: api.cloudflare.com
2024-09-26T08:58:50.535Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: User-Agent: terraform-provider-cloudflare/4.42.0 terraform-plugin-sdk/2.34.0 terraform/1.6.6
2024-09-26T08:58:50.535Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Authorization: ***
2024-09-26T08:58:50.535Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Content-Type: application/json
2024-09-26T08:58:50.535Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Accept-Encoding: gzip
2024-09-26T08:58:50.535Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: 2024/09/26 08:58:50 
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: HTTP/2.0 200 OK
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Cf-Auditlog-Id: 01922d8d-f337-7dd0-888f-ae3bf30d3886
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Cf-Cache-Status: DYNAMIC
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Cf-Ray: 8c920df1df7b6813-SEA
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Content-Type: application/json; charset=UTF-8
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Date: Thu, 26 Sep 2024 08:58:50 GMT
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Server: cloudflare
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Set-Cookie: __cflb=0H28vgHxwvgAQtjUGUFqYFDiSDreGJnV3fFLYxoLeey; SameSite=Lax; path=/; expires=Thu, 26-Sep-24 11:28:51 GMT; HttpOnly
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Set-Cookie: __cf_bm=HwqgYtWinRUhzt0ShEOuwnrNPM4yJXJNnXd84IfqQ1A-1727341130-1.0.1.1-LtjJPlJCM9oQca1GaQCcub6mEkVbpTiELemcAvavng4Y4Aa6kX3dt_FO6ZLMfzlRylhlqHLHN2obYEaie4QFmw; path=/; expires=Thu, 26-Sep-24 09:28:50 GMT; domain=.api.cloudflare.com; HttpOnly; Secure; SameSite=None
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Set-Cookie: __cfruid=dd1c1db9578fc640dba4e216251e14831253e5c0-1727341130; path=/; domain=.api.cloudflare.com; HttpOnly; Secure; SameSite=None
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: Vary: Accept-Encoding
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: {
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:   "result": [
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     {
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "value": "C2HKXV4PTP",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "description": "Sample Description",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "created_at": "2024-09-20T13:10:23Z"
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     },
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     {
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "value": "FVFK51GX1WFV",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "description": "Sample Description",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "created_at": "2024-09-20T13:10:23Z"
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     },
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     {
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "value": "C02S43YYGG7L",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "description": "Sample Description",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "created_at": "2024-09-20T13:10:23Z"
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     },
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     {
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "value": "M65PWYX13V",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "description": "Sample Description",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "created_at": "2024-09-20T13:10:23Z"
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     },
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     {
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "value": "FDQ3126GCR",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "description": "skatsimpas",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "created_at": "2024-09-24T08:13:37Z"
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     },
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     {
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "value": "C2YWK9WVMR",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "description": "apapaspiridis laptop",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "created_at": "2024-09-23T13:41:49Z"
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     },
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     {
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "value": "C02G2B0PQ6L4",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "description": "gziaka",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "created_at": "2024-09-23T13:41:33Z"
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     },
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     {
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "value": "C17F5B32Q6L4",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "description": "sbouzis",
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:       "created_at": "2024-09-23T13:41:33Z"
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     }
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:   ],
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:   "success": true,
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:   "errors": [],
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:   "messages": [],
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:   "result_info": {
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     "page": 1,
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     "per_page": 50,
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     "count": 8,
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     "total_count": 8,
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:     "total_pages": 1
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0:   }
2024-09-26T08:58:50.645Z [DEBUG] provider.terraform-provider-cloudflare_v4.42.0: }
2024-09-26T08:58:50.647Z [WARN]  Provider "registry.terraform.io/cloudflare/cloudflare" produced an unexpected new value for cloudflare_zero_trust_list.byod_devices_new during refresh.
      - .items_with_description: planned set element cty.ObjectVal(map[string]cty.Value{"description":cty.StringVal("Device 1"), "value":cty.StringVal("XSJSAASD")}) does not correlate with any element in actual
      - .items_with_description: planned set element cty.ObjectVal(map[string]cty.Value{"description":cty.StringVal("Device 2"), "value":cty.StringVal("UINLNLLN")}) does not correlate with any element in actual
      - .items_with_description: planned set element cty.ObjectVal(map[string]cty.Value{"description":cty.StringVal("Device 3"), "value":cty.StringVal("RYWEUEUW")}) does not correlate with any element in actual
      - .items_with_description: length changed from 3 to 8
2024-09-26T08:58:50.650Z [WARN]  Provider "registry.terraform.io/cloudflare/cloudflare" produced an invalid plan for cloudflare_zero_trust_list.byod_devices_new, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .items: planned value cty.SetValEmpty(cty.String) for a non-computed attribute

Steps to reproduce

  1. Apply
  2. Check successful output
  3. Check Zero Trust device list in dashboard that has not been updated like in the screenshot below
    Screenshot from 2024-09-24 13-06-18

Additional factoids

No response

References

No response

@diplatis diplatis 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.

Copy link
Contributor

Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of TF_LOG=DEBUG output to be provided. The only parts that should be redacted are your user credentials in the X-Auth-Key, X-Auth-Email and Authorization HTTP headers. Details such as zone or account identifiers are not considered sensitive but can be redacted if you are very cautious. This log file provides additional context from Terraform, the provider and the Cloudflare API that helps in debugging issues. Without it, maintainers are very limited in what they can do and may hamper diagnosis efforts.

This issue has been marked with triage/needs-information and is unlikely to receive maintainer attention until the log file is provided making this a complete bug report.

@github-actions github-actions bot added triage/needs-information Indicates an issue needs more information in order to work on it. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Sep 25, 2024
@diplatis
Copy link
Author

I have updated the description with TF_LOG=DEBUG output.

@hewitt-brown
Copy link

I would also like to point out that this is also broken for resource "cloudflare_zero_trust_list" when trying to update lists using "items_with_description".

@Hirukami
Copy link

cloudflare_zero_trust_list is also trying to replace the current list, but the items are the same...

I tested with the for_each loop and without, and the results were the same. It looks like there is a bug in the provider because the list is the same.

@diplatis
Copy link
Author

diplatis commented Nov 1, 2024

Cloudflare engineering team has acknowledged this as a bug, and it’s currently under review and being worked on. It seems to be an API bug.

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. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants