You can use Opal’s Terraform provider to manage your Opal infrastructure with code. Use the following instructions to install and get started with Terraform in Opal.
Most functionality in the Opal UI is also supported using Terraform. Refer to the provider documentation to see available resources, and reach out if you have specific requests.You should generally use Terraform to manage stateless settings, e.g., request configurations or adding users as permanent members of groups. Once you start using Terraform to manage settings, try to minimize modifications to the same settings in the Opal UI.Terraform is not suited for managing settings which depend on actions occurring at a specific moment in time—e.g., converting users to timebound access—because Terraform maintains its own internal state.You also cannot create apps with Terraform (opal_app is a read-only data source); however, you can programmatically create custom (push-only) apps and custom connector apps via the POST /v1/apps REST API endpoint.To manage OpalScripts with Terraform, see Manage OpalScripts with Terraform.
Select Use Provider and copy the dropdown code block. Ensure you use the latest version.
Create a configuration file and paste in the code block.
If you self-host Opal, in the provider section, add server_url = “<SERVER_URL>", replacing SERVER_URL with your self-hosted domain and the suffix /v1—for example, https://company-name-opal.dev/v1. If you use cloud Opal, skip this step.
Save your Opal API key in an environment variable named OPAL_AUTH_TOKEN. Alternatively, or if you’re on a version earlier than 3.0.2, add bearer_auth = "<API_KEY>” to the provider section, replacing API_KEY with your Opal API key.
See the Terraform provider documentation for example usage. To create certain resources, you may need to provide IDs, which you can find for most objects on the Detail tab in the Inventory in the Opal dashboard.For example, to create a group with the Terraform provider, you must provide an app_id to contain the group. You can find this ID from the app’s Detail tab.
The following is an example resource block used to create a new Opal group.
terraform { required_providers { opal = { source = "opalsecurity/opal" version = "~> 3.7" } }}provider "opal" {// Define OPAL_AUTH_TOKEN as an environment variable, otherwise include the following line:// bearer_auth = 'API_KEY_HERE'}resource "opal_group" "tf_test" { name = "tf_test_group" group_type = "OPAL_GROUP" app_id = "3ecff5db-e3fc-40c7-bb36-ff202f033095" // Retrieved from Opal dashboard visibility = "GLOBAL" request_configurations = [ { priority = 0 require_mfa_to_request = false allow_requests = false require_support_ticket = false auto_approval = false } ]}
After running terraform plan and terraform apply, the group is created.
Last modified on October 27, 2026
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Opal Security Docs","colors":{"primary":"#0C7997","light":"#EDFCFC","dark":"#074055"},"logo":{"light":"https://mintcdn.com/opalsecurity/FBbZyeMPZrA69UcV/logo/logo-dark.svg?fit=max\u0026auto=format\u0026n=FBbZyeMPZrA69UcV\u0026q=85\u0026s=93a4bd75f157f9f0ab43cdf4d715b5cd","dark":"https://mintcdn.com/opalsecurity/FBbZyeMPZrA69UcV/logo/logo-light.svg?fit=max\u0026auto=format\u0026n=FBbZyeMPZrA69UcV\u0026q=85\u0026s=1774b545e4f1c5cad647f5194f7b26d9"},"favicon":{"light":"https://mintcdn.com/opalsecurity/DRAwGKUXMxLRQouh/logo/icon-opal-black.svg?fit=max\u0026auto=format\u0026n=DRAwGKUXMxLRQouh\u0026q=85\u0026s=9c8bd1204b6b5b83542c2ab5be549858","dark":"https://mintcdn.com/opalsecurity/DRAwGKUXMxLRQouh/logo/icon-opal-white.svg?fit=max\u0026auto=format\u0026n=DRAwGKUXMxLRQouh\u0026q=85\u0026s=73b53b4ceab6ae0b00e30b2042a6020a"},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","latex":false},"integrations":{"ga4":{"measurementId":"G-1PPPM1WF6D"}},"errors":{"404":{"redirect":false,"title":"Page can't be found","description":"Sorry! This page might have been moved, or the link might be broken. Go back to our documentation via https://docs.opal.dev/docs/welcome."}},"metadata":{"timestamp":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"opalsecurity","hasAudioNarration":false,"actualSubdomain":"opalsecurity","customDomains":["docs.opal.dev"],"gitSource":{"type":"github","owner":"opalsecurity","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aea9215bfa98e6100bc3edf","collectionId":"5af036f9-c6ea-49e4-be81-d1785954a4aa","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aea9215bfa98e6100bc3edf"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aea9215bfa98e6100bc3edf","clientVersion":"0.0.4054","searchFilterCounts":[{"language":"default","tag":"API Reference","count":214},{"language":"default","tag":"Opal API","count":209},{"language":"default","tag":"Documentation","count":100},{"language":"default","tag":"Integrations","count":96},{"language":"default","tag":"Entitlement Management","count":64},{"language":"default","tag":"resources","count":34},{"language":"default","tag":"groups","count":32},{"language":"default","tag":"Getting Started","count":25},{"language":"default","tag":"Access Management","count":22},{"language":"default","tag":"Infrastructure","count":22}]},"assistantConfig":{"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"deflection":{"enabled":true,"email":"support@opal.dev","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"docs/use-terraform-with-opal","slug":"/docs/use-terraform-with-opal","pageMetadata":{"title":"Use Terraform with Opal","description":"Learn how to set up Opal's Terraform provider.","href":"/docs/use-terraform-with-opal"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to set up Opal’s Terraform provider.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,OptimizedImage}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`You can use Opal’s Terraform provider to manage your Opal infrastructure with code. Use the following instructions to install and get started with Terraform in Opal.`}),`\n`,_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`Most functionality in the Opal UI is also supported using Terraform. Refer to the provider `,_jsx(_components.a,{href:`https://registry.terraform.io/providers/opalsecurity/opal/latest/docs/resources/access_rule`,children:`documentation`}),` to see available resources, and reach out if you have specific requests.`]}),`\n`,_jsx(_components.p,{children:`You should generally use Terraform to manage stateless settings, e.g., request configurations or adding users as permanent members of groups. Once you start using Terraform to manage settings, try to minimize modifications to the same settings in the Opal UI.`}),`\n`,_jsx(_components.p,{children:`Terraform is not suited for managing settings which depend on actions occurring at a specific moment in time—e.g., converting users to timebound access—because Terraform maintains its own internal state.`}),`\n`,_jsxs(_components.p,{children:[`You also cannot create apps with Terraform (`,_jsx(_components.code,{children:`opal_app`}),` is a read-only data source); however, you can programmatically create `,_jsx(_components.a,{href:`/docs/custom-integrations-overview`,children:`custom (push-only) apps and custom connector apps`}),` via the `,_jsx(_components.a,{href:`/api-reference/apps/post-apps`,children:_jsx(_components.code,{children:`POST /v1/apps`})}),` REST API endpoint.`]}),`\n`,_jsxs(_components.p,{children:[`To manage OpalScripts with Terraform, see `,_jsx(_components.a,{href:`/docs/opalscript-terraform`,children:`Manage OpalScripts with Terraform`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`requirements`,children:`Requirements`}),`\n`,_jsx(_components.p,{children:`Before you begin, you must:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Create a full-access `,_jsx(_components.a,{href:`/reference/authentication`,children:`API token`}),` in Opal`]}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli`,children:`Install Terraform`})}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`install-opal’s-terraform-provider`,children:`Install Opal’s Terraform provider`}),`\n`,_jsx(_components.p,{children:`To install Terraform for Opal:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Go to `,_jsx(_components.a,{href:`https://registry.terraform.io/providers/opalsecurity/opal/latest/docs`,children:`Opal’s Terraform provider`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Select `,_jsx(_components.strong,{children:`Use Provider`}),` and copy the dropdown code block. Ensure you use the latest version.`]}),`\n`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/opalsecurity/fu-nWazMe1LxLhxi/images/docs/30486ad6baa62944c82ed13adfe9ad0d414bd1cc77ee8242539470208d2f5d6e-opal-tf-provider.png?fit=max\u0026auto=format\u0026n=fu-nWazMe1LxLhxi\u0026q=85\u0026s=0e11b0cd1ad7bf435b7b3ccf3a38bd64`,alt:``,\"data-og-width\":`3147`,width:`3147`,\"data-og-height\":`1601`,height:`1601`,\"data-path\":`images/docs/30486ad6baa62944c82ed13adfe9ad0d414bd1cc77ee8242539470208d2f5d6e-opal-tf-provider.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/opalsecurity/fu-nWazMe1LxLhxi/images/docs/30486ad6baa62944c82ed13adfe9ad0d414bd1cc77ee8242539470208d2f5d6e-opal-tf-provider.png?w=280\u0026fit=max\u0026auto=format\u0026n=fu-nWazMe1LxLhxi\u0026q=85\u0026s=8a6be9a4bf2dddd358bc2b685c27eb28 280w, https://mintcdn.com/opalsecurity/fu-nWazMe1LxLhxi/images/docs/30486ad6baa62944c82ed13adfe9ad0d414bd1cc77ee8242539470208d2f5d6e-opal-tf-provider.png?w=560\u0026fit=max\u0026auto=format\u0026n=fu-nWazMe1LxLhxi\u0026q=85\u0026s=b59420c78266a532b224bc8f31a4ae5f 560w, https://mintcdn.com/opalsecurity/fu-nWazMe1LxLhxi/images/docs/30486ad6baa62944c82ed13adfe9ad0d414bd1cc77ee8242539470208d2f5d6e-opal-tf-provider.png?w=840\u0026fit=max\u0026auto=format\u0026n=fu-nWazMe1LxLhxi\u0026q=85\u0026s=940bd6cbc11f3bb5856c57a3ef118d2d 840w, https://mintcdn.com/opalsecurity/fu-nWazMe1LxLhxi/images/docs/30486ad6baa62944c82ed13adfe9ad0d414bd1cc77ee8242539470208d2f5d6e-opal-tf-provider.png?w=1100\u0026fit=max\u0026auto=format\u0026n=fu-nWazMe1LxLhxi\u0026q=85\u0026s=2cbfe5cc74e7076402962b542b852e24 1100w, https://mintcdn.com/opalsecurity/fu-nWazMe1LxLhxi/images/docs/30486ad6baa62944c82ed13adfe9ad0d414bd1cc77ee8242539470208d2f5d6e-opal-tf-provider.png?w=1650\u0026fit=max\u0026auto=format\u0026n=fu-nWazMe1LxLhxi\u0026q=85\u0026s=337dfcba734e1eb68ac48e09027eb04a 1650w, https://mintcdn.com/opalsecurity/fu-nWazMe1LxLhxi/images/docs/30486ad6baa62944c82ed13adfe9ad0d414bd1cc77ee8242539470208d2f5d6e-opal-tf-provider.png?w=2500\u0026fit=max\u0026auto=format\u0026n=fu-nWazMe1LxLhxi\u0026q=85\u0026s=6f6033ee7b84f78013facb074a4b2032 2500w`}),`\n`,_jsxs(_components.ol,{start:`3`,children:[`\n`,_jsx(_components.li,{children:`Create a configuration file and paste in the code block.`}),`\n`,_jsxs(_components.li,{children:[`If you self-host Opal, in the `,_jsx(_components.code,{children:`provider`}),` section, add `,_jsx(_components.code,{children:`server_url = “\u003cSERVER_URL>\"`}),`, replacing `,_jsx(_components.code,{children:`SERVER_URL`}),` with your self-hosted domain and the suffix `,_jsx(_components.code,{children:`/v1`}),`—for example, `,_jsx(_components.code,{children:`https://company-name-opal.dev/v1`}),`. If you use cloud Opal, skip this step.`]}),`\n`,_jsxs(_components.li,{children:[`Save your Opal API key in an environment variable named `,_jsx(_components.code,{children:`OPAL_AUTH_TOKEN`}),`. Alternatively, or if you’re on a version earlier than 3.0.2, add `,_jsx(_components.code,{children:`bearer_auth = \"\u003cAPI_KEY>”`}),` to the `,_jsx(_components.code,{children:`provider`}),` section, replacing `,_jsx(_components.code,{children:`API_KEY`}),` with your Opal API key.`]}),`\n`,_jsx(_components.li,{children:`Save the configuration file.`}),`\n`,_jsxs(_components.li,{children:[`Run `,_jsx(_components.code,{children:`terraform init`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Run `,_jsx(_components.code,{children:`terraform apply`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`use-opal’s-terraform-provider`,children:`Use Opal’s Terraform provider`}),`\n`,_jsxs(_components.p,{children:[`See the `,_jsx(_components.a,{href:`https://registry.terraform.io/providers/opalsecurity/opal/latest/docs`,children:`Terraform provider`}),` documentation for example usage. To create certain resources, you may need to provide IDs, which you can find for most objects on the `,_jsx(_components.strong,{children:`Detail`}),` tab in the `,_jsx(_components.strong,{children:`Inventory`}),` in the Opal dashboard.`]}),`\n`,_jsxs(_components.p,{children:[`For example, to `,_jsx(_components.a,{href:`https://registry.terraform.io/providers/opalsecurity/opal/latest/docs/resources/group`,children:`create a group`}),` with the Terraform provider, you must provide an `,_jsx(_components.code,{children:`app_id`}),` to contain the group. You can find this ID from the app’s `,_jsx(_components.strong,{children:`Detail`}),` tab.`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/opalsecurity/TlQj9FwRe9HHNEYB/images/docs/166fe68765f0089d199c2b609a32a9a04577fe509755a994fc303b2985901aae-example-app-id.png?fit=max\u0026auto=format\u0026n=TlQj9FwRe9HHNEYB\u0026q=85\u0026s=815826942b96de7d7b1f207bc9149307`,alt:``,\"data-og-width\":`3055`,width:`3055`,\"data-og-height\":`1446`,height:`1446`,\"data-path\":`images/docs/166fe68765f0089d199c2b609a32a9a04577fe509755a994fc303b2985901aae-example-app-id.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/opalsecurity/TlQj9FwRe9HHNEYB/images/docs/166fe68765f0089d199c2b609a32a9a04577fe509755a994fc303b2985901aae-example-app-id.png?w=280\u0026fit=max\u0026auto=format\u0026n=TlQj9FwRe9HHNEYB\u0026q=85\u0026s=2c3423125af373e328475521a4563404 280w, https://mintcdn.com/opalsecurity/TlQj9FwRe9HHNEYB/images/docs/166fe68765f0089d199c2b609a32a9a04577fe509755a994fc303b2985901aae-example-app-id.png?w=560\u0026fit=max\u0026auto=format\u0026n=TlQj9FwRe9HHNEYB\u0026q=85\u0026s=d57ca44ab25f04429abc157042e666e6 560w, https://mintcdn.com/opalsecurity/TlQj9FwRe9HHNEYB/images/docs/166fe68765f0089d199c2b609a32a9a04577fe509755a994fc303b2985901aae-example-app-id.png?w=840\u0026fit=max\u0026auto=format\u0026n=TlQj9FwRe9HHNEYB\u0026q=85\u0026s=d3a9a7065b8369372c965561dc9dead4 840w, https://mintcdn.com/opalsecurity/TlQj9FwRe9HHNEYB/images/docs/166fe68765f0089d199c2b609a32a9a04577fe509755a994fc303b2985901aae-example-app-id.png?w=1100\u0026fit=max\u0026auto=format\u0026n=TlQj9FwRe9HHNEYB\u0026q=85\u0026s=416e42fb46c210976465dd5b31306c9c 1100w, https://mintcdn.com/opalsecurity/TlQj9FwRe9HHNEYB/images/docs/166fe68765f0089d199c2b609a32a9a04577fe509755a994fc303b2985901aae-example-app-id.png?w=1650\u0026fit=max\u0026auto=format\u0026n=TlQj9FwRe9HHNEYB\u0026q=85\u0026s=88637b07997745ecfe585b50f9a6cd22 1650w, https://mintcdn.com/opalsecurity/TlQj9FwRe9HHNEYB/images/docs/166fe68765f0089d199c2b609a32a9a04577fe509755a994fc303b2985901aae-example-app-id.png?w=2500\u0026fit=max\u0026auto=format\u0026n=TlQj9FwRe9HHNEYB\u0026q=85\u0026s=2607abc426f4e4460a931988c134267f 2500w`}),`\n`,_jsx(Heading,{level:`3`,id:`example-configuration-and-usage`,children:`Example configuration and usage`}),`\n`,_jsx(_components.p,{children:`The following is an example resource block used to create a new Opal group.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`example.tf`,numberOfLines:`29`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`29`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`terraform {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` required_providers`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` opal`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` source`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"opalsecurity/opal\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` version`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"~> 3.7\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`provider `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"opal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Define OPAL_AUTH_TOKEN as an environment variable, otherwise include the following line:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// bearer_auth = 'API_KEY_HERE'`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`resource `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"opal_group\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"tf_test\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` name`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tf_test_group\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` group_type`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"OPAL_GROUP\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` app_id`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"3ecff5db-e3fc-40c7-bb36-ff202f033095\"`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Retrieved from Opal dashboard`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` visibility`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"GLOBAL\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` request_configurations`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` priority`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` 0`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` require_mfa_to_request`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` allow_requests`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` require_support_ticket`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` false`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` auto_approval`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` =`}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:` false`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsxs(_components.p,{children:[`After running `,_jsx(_components.code,{children:`terraform plan`}),` and `,_jsx(_components.code,{children:`terraform apply`}),`, the group is created.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Use Terraform with Opal","description":"Learn how to set up Opal's Terraform provider.","href":"/docs/use-terraform-with-opal"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Requirements","slug":"requirements","depth":2,"children":[]},{"title":"Install Opal’s Terraform provider","slug":"install-opal’s-terraform-provider","depth":2,"children":[]},{"title":"Use Opal’s Terraform provider","slug":"use-opal’s-terraform-provider","depth":2,"children":[{"title":"Example configuration and usage","slug":"example-configuration-and-usage","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/opalsecurity/d0e14c3cf9bbd682/changelog-scraper.js"],"subdomain":"opalsecurity","siteName":"Opal Security Docs","title":"Use Terraform with Opal - Opal Security Docs","contextualStarterQuestions":[{"_id":"6ae0ff2bc878fa74d974b5fc","deploymentId":"68ddaa9a3f8b7de5bc3a7b47","questionText":"How do I install the provider?","status":"active","generatedBy":"contextual","path":"docs/use-terraform-with-opal","createdAt":"2026-10-27T19:44:43.568Z","updatedAt":"2026-10-27T19:44:43.568Z","__v":0},{"_id":"6ae0ff2bc878fa74d974b5fe","deploymentId":"68ddaa9a3f8b7de5bc3a7b47","questionText":"Do I need an API token first?","status":"active","generatedBy":"contextual","path":"docs/use-terraform-with-opal","createdAt":"2026-10-27T19:44:43.568Z","updatedAt":"2026-10-27T19:44:43.568Z","__v":0},{"_id":"6ae0ff2bc878fa74d974b5fd","deploymentId":"68ddaa9a3f8b7de5bc3a7b47","questionText":"What can Terraform manage in Opal?","status":"active","generatedBy":"contextual","path":"docs/use-terraform-with-opal","createdAt":"2026-10-27T19:44:43.568Z","updatedAt":"2026-10-27T19:44:43.568Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-27T19:44:25.040Z","gitLastModified":"2026-10-27T19:42:45.000Z","originalFileLocation":"docs/use-terraform-with-opal.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to set up Opal\u0026#x27;s Terraform provider.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Opal Security Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Use Terraform with Opal - Opal Security Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to set up Opal\u0026#x27;s Terraform provider.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Opal Security Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.opal.dev/docs/use-terraform-with-opal\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://opalsecurity.mintlify.app/_mintlify/api/og/v2?division=For+Developers\u0026amp;title=Use+Terraform+with+Opal\u0026amp;description=Learn+how+to+set+up+Opal%27s+Terraform+provider.\u0026amp;theme=287ef1256bbb1bf2a61f3fd2\u0026amp;signature=835329c58d7b7af0d3db9d1c5fb59cedfe0a51e84913644d22aff9298caa9a50\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Use Terraform with Opal - Opal Security Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to set up Opal\u0026#x27;s Terraform provider.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://opalsecurity.mintlify.app/_mintlify/api/og/v2?division=For+Developers\u0026amp;title=Use+Terraform+with+Opal\u0026amp;description=Learn+how+to+set+up+Opal%27s+Terraform+provider.\u0026amp;theme=287ef1256bbb1bf2a61f3fd2\u0026amp;signature=835329c58d7b7af0d3db9d1c5fb59cedfe0a51e84913644d22aff9298caa9a50\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/opalsecurity/t501z2uOx-XXqevB/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Opal Security Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0C7997\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.opal.dev/docs/use-terraform-with-opal\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/use-terraform-with-opal.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.opal.dev/#organization\",\"name\":\"Opal Security Docs\",\"url\":\"https://docs.opal.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/opalsecurity/FBbZyeMPZrA69UcV/logo/logo-dark.svg?fit=max\u0026auto=format\u0026n=FBbZyeMPZrA69UcV\u0026q=85\u0026s=93a4bd75f157f9f0ab43cdf4d715b5cd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.opal.dev#website\",\"name\":\"Opal Security Docs\",\"url\":\"https://docs.opal.dev\",\"publisher\":{\"@id\":\"https://docs.opal.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.opal.dev/docs/use-terraform-with-opal#webpage\",\"url\":\"https://docs.opal.dev/docs/use-terraform-with-opal\",\"name\":\"Use Terraform with Opal\",\"description\":\"Learn how to set up Opal's Terraform provider.\",\"dateModified\":\"2026-10-27T19:42:45.000Z\",\"isPartOf\":{\"@id\":\"https://docs.opal.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.opal.dev/docs/use-terraform-with-opal#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.opal.dev/docs/use-terraform-with-opal#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"For Developers\",\"item\":\"https://docs.opal.dev/docs/opal-cli\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Use Terraform with Opal\",\"item\":\"https://docs.opal.dev/docs/use-terraform-with-opal\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.opal.dev/docs/use-terraform-with-opal#article\",\"headline\":\"Use Terraform with Opal\",\"name\":\"Use Terraform with Opal\",\"description\":\"Learn how to set up Opal's Terraform provider.\",\"url\":\"https://docs.opal.dev/docs/use-terraform-with-opal\",\"mainEntityOfPage\":{\"@id\":\"https://docs.opal.dev/docs/use-terraform-with-opal#webpage\"},\"dateModified\":\"2026-10-27T19:42:45.000Z\",\"publisher\":{\"@id\":\"https://docs.opal.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.opal.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Opal Security Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Opal Security Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Welcome","icon":"leaf","pages":[{"title":"Quickstart","mode":"wide","href":"/docs/welcome"},{"title":"Overview","href":"/docs/opal-overview"},{"title":"Concepts","href":"/docs/opal-101"},{"title":"Opal architecture","href":"/docs/opal-architecture"},{"group":"Best practices","pages":[{"title":"Best practices for access requests","href":"/docs/best-practices-for-access-requests"},{"title":"Best practices for access reviews","href":"/docs/best-practices-for-user-access-reviews"}]}]},{"group":"End user","icon":"book-open","pages":[{"title":"Access Request FAQs","sidebarTitle":"How to request access","href":"/docs/end-user-faq"},{"title":"Tips on searching","href":"/docs/tips-on-searching"},{"title":"Complete Access Reviews","sidebarTitle":"How to complete access reviews","href":"/docs/complete-access-reviews"}]},{"group":"Getting Started","icon":"rocket","pages":[{"title":"Set up Cloud","href":"/docs/set-up-cloud"},{"group":"Set up Self-Hosted","pages":[{"title":"Set up Self-Hosted","href":"/docs/self-host-overview"},{"title":"Self-Hosted on AWS EKS","href":"/docs/self-host-opal-aws-guide"},{"title":"Self-Hosted on GKE","href":"/docs/self-host-opal-gke-guide"},{"title":"Disaster recovery guide","href":"/docs/disaster-recovery-guide"},{"title":"Update your Opal installation","href":"/docs/update-self-hosted-opal"},{"title":"Install Opal using Helm","href":"/docs/install-opal-using-helm"},{"title":"Set up an Airgapped Opal Environment","href":"/docs/setup-an-airgapped-opal-environment"},{"title":"Configure Async Exports Storage (Self-Hosted)","href":"/docs/configure-async-exports-storage"},{"title":"Kubernetes Components and Health Monitoring","href":"/docs/kubernetes-components-and-health-monitoring-guide"}]},{"group":"Connect Identity or HR Providers","pages":[{"title":"Connect Identity or HR Providers","sidebarTitle":"Overview","href":"/docs/connect-your-identity-provider-idp"},{"title":"Add your first IDP/HR provider","href":"/docs/add-your-first-idphr-provider"},{"title":"Add additional IDP/HR providers","href":"/docs/add-additional-idphr-providers"},{"title":"Import user secondary emails","href":"/docs/importing-user-secondary-email"}]},{"title":"Connect Productivity Tools","sidebarTitle":"Connect Productivity Tools","href":"/docs/connect-your-productivity-tools"},{"group":"Connect Apps and Infrastructure","pages":[{"title":"Connect Apps and Infrastructure","sidebarTitle":"Overview","href":"/docs/set-up-connections"},{"title":"Import and configure resources","href":"/docs/import-and-configure-resources-and-groups"},{"title":"Opal's server IP ranges","href":"/docs/ip-ranges"}]},{"group":"Configure SSO and MFA","pages":[{"title":"Configure SSO and MFA","sidebarTitle":"Overview","href":"/docs/configure-sso-and-mfa"},{"group":"SSO with SAML","pages":[{"title":"SSO with SAML","href":"/docs/sso-with-saml"},{"title":"Google SAML Setup","href":"/docs/google-saml-setup"},{"title":"Okta SAML Setup","href":"/docs/okta-saml-setup"}]},{"title":"Okta Multifactor Authentication","href":"/docs/okta-multifactor-authentication"},{"title":"Okta SCIM: Provision Opal Users","href":"/docs/okta-scim-integration"},{"title":"OIDC Provider Setup for Opal Actions","href":"/docs/oidc-provider-setup-for-opal-actions"}]}]},{"group":"Access Management","icon":"shield","pages":[{"group":"Manage end-user catalog","pages":[{"title":"Curate end-user catalog","href":"/docs/curate-catalog"},{"title":"Bundles","href":"/docs/bundles"},{"title":"Configure reviewers","href":"/docs/configure-reviewers"},{"title":"Escalate if no response","href":"/docs/escalate-if-no-response"},{"title":"Request on behalf rules","href":"/docs/request-on-behalf"},{"title":"Delegate reviews","href":"/docs/delegate-reviews"}]},{"title":"Configuration templates","href":"/docs/configuration-templates"},{"title":"Manage access with ticketing","href":"/docs/ticket-propagation"},{"title":"Access Rules","href":"/docs/access-rules"},{"title":"Risk Center","href":"/docs/least-privilege-posture-management"},{"group":"Manage groups in Opal","pages":[{"title":"Overview","href":"/docs/manage-groups-in-opal"},{"title":"Manage break-glass access","href":"/docs/manage-breakglass-access"},{"title":"Nested groups","href":"/docs/nested-groups"},{"title":"Group aliasing","href":"/docs/okta-group-aliasing"},{"title":"Linked groups","href":"/docs/linked-groups"},{"title":"Group leaders","href":"/docs/group-projects"}]},{"title":"Notifications","href":"/docs/notifications"},{"title":"Special roles in Opal","href":"/docs/roles-in-opal"},{"title":"Owner Permissions","href":"/docs/owner-permissions"},{"title":"Custom Opal roles","href":"/docs/custom-opal-roles"},{"title":"User provisioning","href":"/docs/user-provisioning"},{"title":"Access Comparison","sidebarTitle":"Access Comparison","tag":"NEW","href":"/docs/access-comparison"}]},{"group":"AI Agent Governance","icon":"cpu","pages":[{"title":"Agent Inventory","href":"/docs/agent-inventory"},{"title":"OpenAI and ChatGPT","href":"/docs/openai-chatgpt-setup"},{"title":"Anthropic Setup","href":"/docs/anthropic-agent-setup"}]},{"group":"OpalScript","icon":"scroll","tag":"NEW","pages":[{"title":"Use OpalScript to automate access workflows","sidebarTitle":"Overview","href":"/docs/opalscript-overview"},{"title":"Work with scripts in the OpalScript editor","sidebarTitle":"Using the editor","href":"/docs/opalscript-editor"},{"title":"Write OpalScript with AI","sidebarTitle":"Write with AI","href":"/docs/opalscript-ai-assistant"},{"title":"Utility Modules for OpalScript","sidebarTitle":"Utility Modules","href":"/docs/opalscript-utilitymodules"},{"group":"Request Review Scripts","pages":[{"title":"Start automating workflows around requests","sidebarTitle":"Request Review","href":"/docs/requestreview-getstarted"},{"title":"Request Review Example Scripts","sidebarTitle":"Examples","href":"/docs/requestreview-examples"}]},{"title":"Control who can cover a request with delegation conditions","sidebarTitle":"Delegation Conditions","href":"/docs/opalscript-delegation-conditions"},{"title":"Choose a request configuration with OpalScript","sidebarTitle":"Request Configuration Conditions","href":"/docs/opalscript-request-configuration-conditions"},{"title":"Give Paladin extra context with context provider scripts","sidebarTitle":"Paladin Context","tag":"BETA","href":"/docs/opalscript-context-provider"},{"title":"Manage OpalScripts with Terraform","sidebarTitle":"Terraform","href":"/docs/opalscript-terraform"},{"title":"OpalScript Reference","sidebarTitle":"Reference","href":"/docs/opalscript-reference"}]},{"group":"Paladin","icon":"bot","tag":"NEW","pages":[{"title":"Use Paladin to scale your security function","sidebarTitle":"Overview","href":"/docs/paladin/overview"},{"title":"Review access requests with Paladin","sidebarTitle":"Access Requests","href":"/docs/paladin/access-request"},{"title":"Review access campaigns with Paladin Insights","sidebarTitle":"Access Reviews","href":"/docs/paladin/access-reviews"},{"title":"Model providers","sidebarTitle":"Model Providers","href":"/docs/paladin/model-providers"},{"title":"Set up Paladin on self-hosted Opal","sidebarTitle":"Self-Hosted Setup","href":"/docs/paladin/self-hosted-setup"}]},{"group":"OpalQuery","icon":"search","tag":"NEW","pages":[{"title":"Overview","href":"/docs/opal-query"},{"title":"Node queries","href":"/docs/opal-query-node"},{"title":"Access queries","href":"/docs/opal-query-access"},{"title":"Query API","href":"/docs/opal-query-api"}]},{"group":"Auditing and Security","icon":"user-round-search","pages":[{"group":"Access Campaigns","tag":"NEW","pages":[{"title":"Create Access Campaigns","sidebarTitle":"Create access campaigns","href":"/docs/access-campaigns"},{"title":"Manage Access Campaign","sidebarTitle":"Manage your access campaign","href":"/docs/managing-access-campaigns"},{"group":"Legacy UARs","pages":[{"title":"Create Access Reviews","tag":"LEGACY","href":"/docs/access-reviews-legacy"},{"title":"Assign and complete reviews","tag":"LEGACY","href":"/docs/assigning-and-completing-reviews-legacy"},{"title":"Manage reviews","tag":"LEGACY","href":"/docs/managing-user-access-reviews-legacy"}]}]},{"title":"Events","href":"/docs/event-types"},{"title":"Events Streaming","href":"/docs/events-streaming"},{"title":"Metrics dashboard","href":"/docs/metrics"},{"title":"Sync schedules and triggers","href":"/docs/sync-schedules-and-triggers"}]},{"group":"Custom Integrations","icon":"pencil-line","pages":[{"title":"Overview","href":"/docs/custom-integrations-overview"},{"title":"Create your own connector","href":"/docs/how-to-create-your-own-connector"},{"title":"Custom Connector API Spec","href":"/docs/api-spec"},{"title":"Webhooks","href":"/docs/webhooks"}]},{"group":"For Developers","icon":"terminal","pages":[{"title":"Opal CLI","description":"Learn how to configure and use the Opal CLI.","href":"/docs/opal-cli"},{"title":"Use Terraform with Opal","href":"/docs/use-terraform-with-opal"},{"group":"Model Context Protocol (MCP) Server","tag":"NEW","pages":[{"title":"Model Context Protocol (MCP)","mode":"wide","description":"Let your AI Agents interact with Opal by using our MCP server.","sidebarTitle":"Overview","href":"/docs/mcp/overview"},{"title":"End User MCP Server","sidebarTitle":"End Users","href":"/docs/mcp/end-user"},{"title":"Admin Provisioning MCP Server","sidebarTitle":"Admin Provisioning","href":"/docs/mcp/admin-provisioning"},{"title":"Admin Auditing MCP Server","sidebarTitle":"Admin Auditing","href":"/docs/mcp/admin-auditing"},{"title":"Okta Cross App Access (XAA)","sidebarTitle":"Okta Cross App Access","href":"/docs/mcp/okta-cross-app-access"},{"title":"Legacy MCP","deprecated":true,"href":"/docs/mcp/gram-mcp-servers"}]}]}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/reference/authentication"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog/changelog"}]}]},"basePath":"","title":"Use Terraform with Opal - Opal Security Docs","buildId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","deploymentId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-B4-wUcHm.js","lightbox-handle-r17bVUz3.js"]}