-
Notifications
You must be signed in to change notification settings - Fork 632
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: changes always detected for saml -> identity_provider_id #1553
Comments
Thank you for reporting this issue! For maintainers to dig into issues it is required that all issues include the entirety of This issue has been marked with |
The log is attached as a file. |
ignore the bot, it doesn't yet know how to read attachments :) does this still work as you expect without the |
but it's saying that no one will care about my issue 😢
sorry, not sure if i understand the question 😓 do you mean this schema? or if we remove this id from the configuration? |
just your configuration; I'm wondering if this field is no longer required to associate the identity provider without it. |
sorry for the delay in getting back to you! |
… input JSON being sent to the Cloudflare API unless there was at least one team specified, even though the teams field is optional. This commit changes the behavior of the `github` block to create `include`, `require` and `exclude` blocks with github organizations without specifying a list of teams. Testing was done on my personal Cloudflare Zero Trust account. Running `terraform apply` twice still results in "detected" changes even though they have been applied. I think this is related to issue cloudflare#1553.
… input JSON being sent to the Cloudflare API unless there was at least one team specified, even though the teams field is optional. This commit changes the behavior of the `github` block to create `include`, `require` and `exclude` blocks with github organizations without specifying a list of teams. Testing was done on my personal Cloudflare Zero Trust account. Running `terraform apply` twice still results in "detected" changes even though they have been applied. I think this is related to issue cloudflare#1553.
Previously, the contents of the `github` block were not serialized to input JSON being sent to the Cloudflare API unless there was at least one team specified, even though the teams field is optional. This commit changes the behavior of the `github` block to create `include`, `require` and `exclude` blocks with github organizations without specifying a list of teams. Testing was done on my personal Cloudflare Zero Trust account. Running `terraform apply` twice still results in "detected" changes even though they have been applied. I think this is related to issue cloudflare#1553.
…t a list of teams Previously, the contents of the `github` block were not serialized to input JSON being sent to the Cloudflare API unless there was at least one team specified, even though the teams field is optional. This commit changes the behavior of the `github` block to create `include`, `require` and `exclude` blocks with github organizations without specifying a list of teams. Testing was done on my personal Cloudflare Zero Trust account. Running `terraform apply` twice still results in "detected" changes even though they have been applied. I think this is related to issue cloudflare#1553.
…t a list of teams Previously, the contents of the `github` block were not serialized to input JSON being sent to the Cloudflare API unless there was at least one team specified, even though the teams field is optional. This commit changes the behavior of the `github` block to create `include`, `require` and `exclude` blocks with github organizations without specifying a list of teams. Testing was done on my personal Cloudflare Zero Trust account. Running `terraform apply` twice still results in "detected" changes even though they have been applied. I think this is related to issue cloudflare#1553.
I have this same issue with GitHub and even the Plan output (sanitized):
And here's the TF module itself: locals {
global_deny_emails = []
global_allow_emails = []
applications = {
airflow = {
domain = "airflow.openverse.engineering"
allow_emails = []
deny_emails = []
}
django-admin = {
domain = "api.openverse.engineering/admin"
allow_emails = []
deny_emails = []
}
}
}
resource "cloudflare_access_application" "this" {
for_each = local.applications
account_id = var.account_id
name = each.key
domain = each.value.domain
type = "self_hosted"
session_duration = "24h"
auto_redirect_to_identity = false
}
data "cloudflare_access_identity_provider" "github_login" {
account_id = var.account_id
name = "GitHub Openverse OAuth"
}
resource "cloudflare_access_policy" "deny" {
for_each = toset(keys(local.applications))
application_id = cloudflare_access_application.this[each.key].id
account_id = var.account_id
name = "${each.key} deny policy"
precedence = 1
decision = "deny"
include {
email = concat(
local.global_deny_emails,
local.applications[each.key].deny_emails,
)
}
}
resource "cloudflare_access_policy" "allow" {
for_each = toset(keys(local.applications))
application_id = cloudflare_access_application.this[each.key].id
account_id = var.account_id
name = "${each.key} allow policy"
precedence = 2
decision = "allow"
include {
email = concat(
local.global_allow_emails,
local.applications[each.key].allow_emails
)
email_domain = toset(["<redacted>"])
github {
identity_provider_id = data.cloudflare_access_identity_provider.github_login.id
name = "WordPress"
teams = ["openverse-maintainers"]
}
}
} It applies cleanly and doesn't appear to actually cause any changes to the configuration. The identity provider IDs all match and everything. |
Marking this issue as stale due to 90 days of inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 7 days it will automatically be closed. Maintainers can also remove the |
This issue was closed because it has been stalled for 7 days with no activity. |
I'll just note the similar churn I was seeing before is now resolved with these versions:
|
Confirmation
Terraform and Cloudflare provider version
Affected resource(s)
cloudflare_access_policy
Terraform configuration files
Debug output
See attached file: tf.log
Panic output
No response
Expected output
No changes to
cloudflare_access_policy
resource.Actual output
Terraform always detects changes:
Steps to reproduce
terraform plan
.Additional factoids
It looks like this may be related to the fact that Cloudflare API doesn't return
identity_provider_id
(anymore?). If that is indeed the case would it be possible to raise it with the team responsible for the endpoint internally? I'm happy to create also a support request if that helps.References
No response
The text was updated successfully, but these errors were encountered: