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

Domain/issuer not returned for cloudflare_access_application in OIDC mode #4476

Open
3 tasks done
tomaciazek-covantis opened this issue Oct 30, 2024 · 2 comments
Open
3 tasks done
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log.

Comments

@tomaciazek-covantis
Copy link

tomaciazek-covantis commented Oct 30, 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.9.3
Cloudflare: 4.45.0

Affected resource(s)

cloudflare_access_application

Terraform configuration files

resource "cloudflare_access_application" "test" {
  account_id = var.cloudflare_account_id
  name       = "test"
  type       = "saas"
  saas_app {
    auth_type = "oidc"
  }
}

output "domain" {
  value = cloudflare_access_application.test.domain
}

Link to debug output

https://gist.github.com/tomaciazek-covantis/b0dd973a39a1fa82e64b0fc294c0d66f

Panic output

No response

Expected output

domain equal to the issuer URL

Actual output

domain = ""

Steps to reproduce

apply the provided resource

Additional factoids

I can see in the code of the provider that for app.AuthType == "oidc" the saas_app.idp_entity_id attribute is not read after creation. Perhaps this is the actual attribute that should be used instead of domain to retrieve the issuer. Alas, both are null.

References

It used to be possible to retrieve the issuer using the domain attribute, but now this possibility is gone since
#3468
Now if a domain is provided with OIDC application type, Terraform will panic because it produces inconsistent plan (the provided value of the attribute is overwritten after apply).

@tomaciazek-covantis tomaciazek-covantis 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 30, 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

github-actions bot commented Oct 30, 2024

Terraform debug log detected ✅

@github-actions github-actions bot added triage/needs-information Indicates an issue needs more information in order to work on it. triage/debug-log-attached Indicates an issue or PR has a complete Terraform debug log. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. triage/needs-information Indicates an issue needs more information in order to work on it. labels Oct 30, 2024
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/debug-log-attached Indicates an issue or PR has a complete Terraform debug log.
Projects
None yet
Development

No branches or pull requests

1 participant