-
Notifications
You must be signed in to change notification settings - Fork 630
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_access_policy always detects changes when both group and email are included #1215
Comments
I'm experiencing the same issue when trying to include Azure.
It doesn't matter if the Azure block is added to a |
I have the same problem
|
I am having the same issue, when both ~ resource "cloudflare_access_group" "this" {
id = "dd8a4299-ad4d-410b-b4ae-14d621a92694"
name = "allow-me"
# (1 unchanged attribute hidden)
~ include {
~ email = [
+ "[email protected]",
+ "[email protected]",
]
~ email_domain = [
- "example.com",
]
# (9 unchanged attributes hidden)
}
+ include {
+ email_domain = [
+ "example.com",
]
}
} |
I'm still seeing this in 3.8.0 Any chance this can get fixed? |
Still seeing this in 3.9.1 💔 |
I've spent some time looking into this issue and this seems to be due to the way the There seem to be a couple of different bugs interacting here leading to the unwanted behaviour:
See terraform-provider-cloudflare/cloudflare/resource_cloudflare_access_group.go Lines 445 to 449 in 199efbc
require , include or exclude .
These 2 bugs means that you're currently stuck with config that applies outright incorrectly or diffs perpetually. I've attempted to fix this with a local version of the provider by replacing the code in the latter sample with
but this leads to the following error response from the API when configuring multiple blocks Hopefully this can be of some help. I'm hesitant to raise a PR for potential fixes because it seems like the most "correct" solution based on Cloudflare's API would require breaking changes to the provider. |
This seem to be not just for It doesn't really matter if I specify as:
which always comes back as:
or
which always comes back as:
|
I have the same problem, does it make sense to wait for a fix? |
We're running into this when both |
Confirmation
Terraform and Cloudflare provider version
Affected resource(s)
cloudflare_access_policy
Terraform configuration files
Debug output
Not including
Panic output
No response
Expected output
No changes on second apply.
Actual output
Steps to reproduce
Apply, approve changes
Apply again, changes detected
Additional factoids
The policy is created correct and the terraform state show the following. Adding two include{} blocks in the resource also causes changes to be detected on every run and does not create the policy correctly.
References
No response
The text was updated successfully, but these errors were encountered: