-
Notifications
You must be signed in to change notification settings - Fork 626
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
Add support for Access Identity Provider #597
Add support for Access Identity Provider #597
Conversation
Depends on cloudflare/cloudflare-go#403 and build will be red until that lands. |
"client_secret": { | ||
Type: schema.TypeString, | ||
Optional: true, | ||
// client_secret is a write only operation from the Cloudflare API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not totally sold on this however it's the most elegant way of managing the write-but-never-retrievable situation the client_secret
and idp_public_cert
fields are in.
IDPConfig.Attributes = attrData | ||
} | ||
|
||
IDPConfig.AppsDomain = d.Get("config.0.apps_domain").(string) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is a little verbose but I don't mind it as it's explicit and it doesn't require confusing reflection to work out what each field should be.
eda5fa8
to
72ca699
Compare
Got a couple of integration error failures now that I'll need to checkout
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally all is fine, but we need to fix tests and merge conflict.
When the work for terraform-providers/terraform-provider-cloudflare#597 was started, the `messages` object was either empty array or a single string (per the original `cloudflare.Response`[1] struct) but the API response is now spitting out an array of `message` objects inside of the current array. To fix the issue, the two structs have been updated to conform to the required objects. [1]: https://github.com/cloudflare/cloudflare-go/blob/master/cloudflare.go#L363
The issue for the two CI failures above have been fixed in cloudflare/cloudflare-go#425 due to the underlying API response changing. Once that is merged, we're 👌 to merge this. |
* Update `*ListResponse` structs to match API responses When the work for terraform-providers/terraform-provider-cloudflare#597 was started, the `messages` object was either empty array or a single string (per the original `cloudflare.Response`[1] struct) but the API response is now spitting out an array of `message` objects inside of the current array. To fix the issue, the two structs have been updated to conform to the required objects. [1]: https://github.com/cloudflare/cloudflare-go/blob/master/cloudflare.go#L363 * Use Response shared struct for handling fields Co-authored-by: Patryk Szczygłowski <patryk@patryk.net>
Thanks for investigation. It looks that the API has actually been fixed 🙄 |
Introduces full support for Cloudflare Access Identity Providers.
API documentation: https://api.cloudflare.com/#access-identity-providers-properties
Developer documentation: https://developers.cloudflare.com/access/configuring-identity-providers/