From eda5fa8700673a346f22ecba594669807031e675 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Thu, 13 Feb 2020 10:09:16 +1100 Subject: [PATCH] add website documentation --- website/cloudflare.erb | 3 + .../r/access_identity_provider.html.markdown | 82 +++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 website/docs/r/access_identity_provider.html.markdown diff --git a/website/cloudflare.erb b/website/cloudflare.erb index 5704bfa098b..6e09e64d976 100644 --- a/website/cloudflare.erb +++ b/website/cloudflare.erb @@ -46,6 +46,9 @@ > cloudflare_access_application + > + cloudflare_access_identity_provider + > cloudflare_access_policy diff --git a/website/docs/r/access_identity_provider.html.markdown b/website/docs/r/access_identity_provider.html.markdown new file mode 100644 index 00000000000..45a6316072c --- /dev/null +++ b/website/docs/r/access_identity_provider.html.markdown @@ -0,0 +1,82 @@ +--- +layout: "cloudflare" +page_title: "Cloudflare: cloudflare_access_identity_provider" +sidebar_current: "docs-cloudflare-resource-access-identity-provider" +description: |- + Provides a Cloudflare Access Identity Provider resource. +--- + +# cloudflare_access_identity_provider + +Provides a Cloudflare Access Identity Provider resource. Identity Providers are +used as an authentication or authorisation source within Access. + +## Example Usage + +```hcl +# one time pin +resource "cloudflare_access_identity_provider" "pin_login" { + account_id = "1d5fdc9e88c8a8c4518b068cd94331fe" + name = "PIN login" + type = "onetimepin" +} + +# oauth +resource "cloudflare_access_identity_provider" "github_oauth" { + account_id = "1d5fdc9e88c8a8c4518b068cd94331fe" + name = "GitHub OAuth" + type = "github" + config { + client_id = "example" + client_secret = "secret_key" + } +} + +# saml +resource "cloudflare_access_identity_provider" "jumpcloud_saml" { + account_id = "1d5fdc9e88c8a8c4518b068cd94331fe" + name = "JumpCloud SAML" + type = "saml" + config { + issuer_url = "jumpcloud" + sso_target_url = "https://sso.myexample.jumpcloud.com/saml2/cloudflareaccess" + attributes = [ "email", "username" ] + sign_request = false + idp_public_cert = "MIIDpDCCAoygAwIBAgIGAV2ka+55MA0GCSqGSIb3DQEBCwUAMIGSMQswCQ...GF/Q2/MHadws97cZg\nuTnQyuOqPuHbnN83d/2l1NSYKCbHt24o" + } +} +``` + +Please refer to the [developers.cloudflare.com Access documentation][access_identity_provider_guide] +for full reference on what is available and how to configure your provider. + +## Argument Reference + +The following arguments are supported: + +* `account` - (Required) The account ID the provider should be associated with. +* `name` - (Required) Friendly name of the Access Identity Provider configuration. +* `type` - (Required) The provider type to use. Must be one of: `"centrify"`, + `"facebook"`, `"google-apps"`, `"oidc"`, `"github"`, `"google"`, `"saml"`, + `"linkedin"`, `"azureAD"`, `"okta"`, `"onetimepin"`, `"onelogin"`, `"yandex"`. +* `config` - (Optional) Provider configuration from the [developer documentation][access_identity_provider_guide]. + +## Attributes Reference + +The following additional attributes are exported: + +* `id` - ID of the Access Identity Provider +* `name` - Friendly name of the Access Identity Provider configuration. +* `type` - The provider type to use. +* `config` - Access Identity Provider configuration. + +## Import + +Access Identity Providers can be imported using a composite ID formed of account +ID and Access Identity Provider ID. + +``` +$ terraform import cloudflare_access_identity_provider.my_idp cb029e245cfdd66dc8d2e570d5dd3322/e00e1c13-e350-44fe-96c5-fb75c954871c +``` + +[access_identity_provider_guide]: https://developers.cloudflare.com/access/configuring-identity-providers/