1. Registry
  2. Packages
  3. Formal Provider
  4. API Docs
  5. ResourceOauthSettings
Viewing docs for Formal v1.2.9
published on Saturday, Nov 14, 2026 by Formal
formal logo Formal
Viewing docs for Formal v1.2.9
published on Saturday, Nov 14, 2026 by Formal

    Enables OAuth on an MCP, HTTP, gRPC or LLM Resource. OAuth clients (see formal.OauthClient) can then connect to the Resource through the Connector and, unless upstreamOauthMode is none, users link their own upstream accounts, whose access tokens the Connector sends upstream in place of native user credentials. requestedScopes and the client secret update in place and leave linked accounts and OAuth clients’ authorizations as they are. requestedScopes apply to future links. Changing resourceId, upstreamOauthMode, clientId, or issuer, or destroying this resource, deletes every user’s linked account and every OAuth client’s authorization for the Resource. In dcr mode, Formal registers its client once, on create; to register a new one, for example after the authorization server forgot the registration, replace this resource with pulumi up -replace.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as formal from "@formalco/pulumi";
    
    const linear = new formal.Resource("linear", {
        name: "linear",
        technology: "mcp",
        hostname: "mcp.linear.app",
        port: 443,
        tags: {
            "mcp-endpoint": "/mcp",
        },
    });
    // Users link their Linear accounts with Formal's OAuth app.
    const linearResourceOauthSettings = new formal.ResourceOauthSettings("linear", {resourceId: linear.id});
    const github = new formal.Resource("github", {
        name: "github",
        technology: "http",
        hostname: "api.github.com",
        port: 443,
    });
    const config = new pulumi.Config();
    const githubOauthAppClientId = config.require("githubOauthAppClientId");
    const githubOauthAppClientSecret = config.require("githubOauthAppClientSecret");
    // Users link their GitHub accounts with your own GitHub OAuth app. GitHub
    // publishes no protected resource metadata, so set its issuer. Increment
    // client_secret_wo_version to rotate the secret; it is not stored in state.
    const githubResourceOauthSettings = new formal.ResourceOauthSettings("github", {
        resourceId: github.id,
        upstreamOauthMode: "pre_registered",
        clientId: githubOauthAppClientId,
        clientSecretWo: githubOauthAppClientSecret,
        clientSecretWoVersion: 1,
        issuer: "https://github.com/login/oauth",
        requestedScopes: [
            "repo",
            "read:org",
        ],
    });
    
    import pulumi
    import pulumi_formal as formal
    
    linear = formal.Resource("linear",
        name="linear",
        technology="mcp",
        hostname="mcp.linear.app",
        port=443,
        tags={
            "mcp-endpoint": "/mcp",
        })
    # Users link their Linear accounts with Formal's OAuth app.
    linear_resource_oauth_settings = formal.ResourceOauthSettings("linear", resource_id=linear.id)
    github = formal.Resource("github",
        name="github",
        technology="http",
        hostname="api.github.com",
        port=443)
    config = pulumi.Config()
    github_oauth_app_client_id = config.require("githubOauthAppClientId")
    github_oauth_app_client_secret = config.require("githubOauthAppClientSecret")
    # Users link their GitHub accounts with your own GitHub OAuth app. GitHub
    # publishes no protected resource metadata, so set its issuer. Increment
    # client_secret_wo_version to rotate the secret; it is not stored in state.
    github_resource_oauth_settings = formal.ResourceOauthSettings("github",
        resource_id=github.id,
        upstream_oauth_mode="pre_registered",
        client_id=github_oauth_app_client_id,
        client_secret_wo=github_oauth_app_client_secret,
        client_secret_wo_version=1,
        issuer="https://github.com/login/oauth",
        requested_scopes=[
            "repo",
            "read:org",
        ])
    
    package main
    
    import (
    	"github.com/formalco/pulumi-formal/sdk/go/formal"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		linear, err := formal.NewResource(ctx, "linear", &formal.ResourceArgs{
    			Name:       pulumi.String("linear"),
    			Technology: pulumi.String("mcp"),
    			Hostname:   pulumi.String("mcp.linear.app"),
    			Port:       pulumi.Int(443),
    			Tags: pulumi.StringMap{
    				"mcp-endpoint": pulumi.String("/mcp"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Users link their Linear accounts with Formal's OAuth app.
    		_, err = formal.NewResourceOauthSettings(ctx, "linear", &formal.ResourceOauthSettingsArgs{
    			ResourceId: linear.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		github, err := formal.NewResource(ctx, "github", &formal.ResourceArgs{
    			Name:       pulumi.String("github"),
    			Technology: pulumi.String("http"),
    			Hostname:   pulumi.String("api.github.com"),
    			Port:       pulumi.Int(443),
    		})
    		if err != nil {
    			return err
    		}
    		cfg := config.New(ctx, "")
    		githubOauthAppClientId := cfg.Require("githubOauthAppClientId")
    		githubOauthAppClientSecret := cfg.Require("githubOauthAppClientSecret")
    		// Users link their GitHub accounts with your own GitHub OAuth app. GitHub
    		// publishes no protected resource metadata, so set its issuer. Increment
    		// client_secret_wo_version to rotate the secret; it is not stored in state.
    		_, err = formal.NewResourceOauthSettings(ctx, "github", &formal.ResourceOauthSettingsArgs{
    			ResourceId:            github.ID(),
    			UpstreamOauthMode:     pulumi.String("pre_registered"),
    			ClientId:              pulumi.String(githubOauthAppClientId),
    			ClientSecretWo:        pulumi.String(githubOauthAppClientSecret),
    			ClientSecretWoVersion: pulumi.Int(1),
    			Issuer:                pulumi.String("https://github.com/login/oauth"),
    			RequestedScopes: pulumi.StringArray{
    				pulumi.String("repo"),
    				pulumi.String("read:org"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Pulumi = Formal.Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
        var linear = new Pulumi.Resource("linear", new()
        {
            Name = "linear",
            Technology = "mcp",
            Hostname = "mcp.linear.app",
            Port = 443,
            Tags = 
            {
                { "mcp-endpoint", "/mcp" },
            },
        });
    
        // Users link their Linear accounts with Formal's OAuth app.
        var linearResourceOauthSettings = new Pulumi.ResourceOauthSettings("linear", new()
        {
            ResourceId = linear.Id,
        });
    
        var github = new Pulumi.Resource("github", new()
        {
            Name = "github",
            Technology = "http",
            Hostname = "api.github.com",
            Port = 443,
        });
    
        var config = new Config();
        var githubOauthAppClientId = config.Require("githubOauthAppClientId");
        var githubOauthAppClientSecret = config.Require("githubOauthAppClientSecret");
        // Users link their GitHub accounts with your own GitHub OAuth app. GitHub
        // publishes no protected resource metadata, so set its issuer. Increment
        // client_secret_wo_version to rotate the secret; it is not stored in state.
        var githubResourceOauthSettings = new Pulumi.ResourceOauthSettings("github", new()
        {
            ResourceId = github.Id,
            UpstreamOauthMode = "pre_registered",
            ClientId = githubOauthAppClientId,
            ClientSecretWo = githubOauthAppClientSecret,
            ClientSecretWoVersion = 1,
            Issuer = "https://github.com/login/oauth",
            RequestedScopes = new[]
            {
                "repo",
                "read:org",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.formal.Resource;
    import com.pulumi.formal.ResourceArgs;
    import com.pulumi.formal.ResourceOauthSettings;
    import com.pulumi.formal.ResourceOauthSettingsArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            var linear = new Resource("linear", ResourceArgs.builder()
                .name("linear")
                .technology("mcp")
                .hostname("mcp.linear.app")
                .port(443)
                .tags(Map.of("mcp-endpoint", "/mcp"))
                .build());
    
            // Users link their Linear accounts with Formal's OAuth app.
            var linearResourceOauthSettings = new ResourceOauthSettings("linearResourceOauthSettings", ResourceOauthSettingsArgs.builder()
                .resourceId(linear.id())
                .build());
    
            var github = new Resource("github", ResourceArgs.builder()
                .name("github")
                .technology("http")
                .hostname("api.github.com")
                .port(443)
                .build());
    
            final var githubOauthAppClientId = config.require("githubOauthAppClientId");
            final var githubOauthAppClientSecret = config.require("githubOauthAppClientSecret");
            // Users link their GitHub accounts with your own GitHub OAuth app. GitHub
            // publishes no protected resource metadata, so set its issuer. Increment
            // client_secret_wo_version to rotate the secret; it is not stored in state.
            var githubResourceOauthSettings = new ResourceOauthSettings("githubResourceOauthSettings", ResourceOauthSettingsArgs.builder()
                .resourceId(github.id())
                .upstreamOauthMode("pre_registered")
                .clientId(githubOauthAppClientId)
                .clientSecretWo(githubOauthAppClientSecret)
                .clientSecretWoVersion(1)
                .issuer("https://github.com/login/oauth")
                .requestedScopes(            
                    "repo",
                    "read:org")
                .build());
    
        }
    }
    
    configuration:
      githubOauthAppClientId:
        type: string
      githubOauthAppClientSecret:
        type: string
    resources:
      linear:
        type: formal:Resource
        properties:
          name: linear
          technology: mcp
          hostname: mcp.linear.app
          port: 443
          tags:
            mcp-endpoint: /mcp
      # Users link their Linear accounts with Formal's OAuth app.
      linearResourceOauthSettings:
        type: formal:ResourceOauthSettings
        name: linear
        properties:
          resourceId: ${linear.id}
      github:
        type: formal:Resource
        properties:
          name: github
          technology: http
          hostname: api.github.com
          port: 443
      # Users link their GitHub accounts with your own GitHub OAuth app. GitHub
      # publishes no protected resource metadata, so set its issuer. Increment
      # client_secret_wo_version to rotate the secret; it is not stored in state.
      githubResourceOauthSettings:
        type: formal:ResourceOauthSettings
        name: github
        properties:
          resourceId: ${github.id}
          upstreamOauthMode: pre_registered
          clientId: ${githubOauthAppClientId}
          clientSecretWo: ${githubOauthAppClientSecret}
          clientSecretWoVersion: 1
          issuer: https://github.com/login/oauth
          requestedScopes:
            - repo
            - read:org
    
    terraform {
      required_providers {
        formal = {
          source = "pulumi/formal"
        }
      }
    }
    
    resource "formal_resource" "linear" {
      lifecycle {
        create_before_destroy = true
      }
      name       = "linear"
      technology = "mcp"
      hostname   = "mcp.linear.app"
      port       = 443
      tags = {
        "mcp-endpoint" = "/mcp"
      }
    }
    # Users link their Linear accounts with Formal's OAuth app.
    resource "formal_resource_oauth_settings" "linear" {
      lifecycle {
        create_before_destroy = true
      }
      resource_id = formal_resource.linear.id
    }
    resource "formal_resource" "github" {
      lifecycle {
        create_before_destroy = true
      }
      name       = "github"
      technology = "http"
      hostname   = "api.github.com"
      port       = 443
    }
    # Users link their GitHub accounts with your own GitHub OAuth app. GitHub
    # publishes no protected resource metadata, so set its issuer. Increment
    # client_secret_wo_version to rotate the secret; it is not stored in state.
    resource "formal_resource_oauth_settings" "github" {
      lifecycle {
        create_before_destroy = true
      }
      resource_id              = formal_resource.github.id
      upstream_oauth_mode      = "pre_registered"
      client_id                = var.githubOauthAppClientId
      client_secret_wo         = var.githubOauthAppClientSecret
      client_secret_wo_version = 1
      issuer                   = "https://github.com/login/oauth"
      requested_scopes         = ["repo", "read:org"]
    }
    variable "githubOauthAppClientId" {
      type = string
    }
    variable "githubOauthAppClientSecret" {
      type = string
    }
    

    Create ResourceOauthSettings Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ResourceOauthSettings(name: string, args: ResourceOauthSettingsArgs, opts?: CustomResourceOptions);
    @overload
    def ResourceOauthSettings(resource_name: str,
                              args: ResourceOauthSettingsArgs,
                              opts: Optional[ResourceOptions] = None)
    
    @overload
    def ResourceOauthSettings(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              resource_id: Optional[str] = None,
                              client_id: Optional[str] = None,
                              client_secret: Optional[str] = None,
                              client_secret_wo: Optional[str] = None,
                              client_secret_wo_version: Optional[int] = None,
                              issuer: Optional[str] = None,
                              requested_scopes: Optional[Sequence[str]] = None,
                              upstream_oauth_mode: Optional[str] = None)
    func NewResourceOauthSettings(ctx *Context, name string, args ResourceOauthSettingsArgs, opts ...ResourceOption) (*ResourceOauthSettings, error)
    public ResourceOauthSettings(string name, ResourceOauthSettingsArgs args, CustomResourceOptions? opts = null)
    public ResourceOauthSettings(String name, ResourceOauthSettingsArgs args)
    public ResourceOauthSettings(String name, ResourceOauthSettingsArgs args, CustomResourceOptions options)
    
    type: formal:ResourceOauthSettings
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "formal_resource_oauth_settings" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ResourceOauthSettingsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ResourceOauthSettingsArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ResourceOauthSettingsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResourceOauthSettingsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResourceOauthSettingsArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var resourceOauthSettingsResource = new Pulumi.ResourceOauthSettings("resourceOauthSettingsResource", new()
    {
        ResourceId = "string",
        ClientId = "string",
        ClientSecret = "string",
        ClientSecretWo = "string",
        ClientSecretWoVersion = 0,
        Issuer = "string",
        RequestedScopes = new[]
        {
            "string",
        },
        UpstreamOauthMode = "string",
    });
    
    example, err := formal.NewResourceOauthSettings(ctx, "resourceOauthSettingsResource", &formal.ResourceOauthSettingsArgs{
    	ResourceId:            pulumi.String("string"),
    	ClientId:              pulumi.String("string"),
    	ClientSecret:          pulumi.String("string"),
    	ClientSecretWo:        pulumi.String("string"),
    	ClientSecretWoVersion: pulumi.Int(0),
    	Issuer:                pulumi.String("string"),
    	RequestedScopes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	UpstreamOauthMode: pulumi.String("string"),
    })
    
    resource "formal_resource_oauth_settings" "resourceOauthSettingsResource" {
      lifecycle {
        create_before_destroy = true
      }
      resource_id              = "string"
      client_id                = "string"
      client_secret            = "string"
      client_secret_wo         = "string"
      client_secret_wo_version = 0
      issuer                   = "string"
      requested_scopes         = ["string"]
      upstream_oauth_mode      = "string"
    }
    
    var resourceOauthSettingsResource = new ResourceOauthSettings("resourceOauthSettingsResource", ResourceOauthSettingsArgs.builder()
        .resourceId("string")
        .clientId("string")
        .clientSecret("string")
        .clientSecretWo("string")
        .clientSecretWoVersion(0)
        .issuer("string")
        .requestedScopes("string")
        .upstreamOauthMode("string")
        .build());
    
    resource_oauth_settings_resource = formal.ResourceOauthSettings("resourceOauthSettingsResource",
        resource_id="string",
        client_id="string",
        client_secret="string",
        client_secret_wo="string",
        client_secret_wo_version=0,
        issuer="string",
        requested_scopes=["string"],
        upstream_oauth_mode="string")
    
    const resourceOauthSettingsResource = new formal.ResourceOauthSettings("resourceOauthSettingsResource", {
        resourceId: "string",
        clientId: "string",
        clientSecret: "string",
        clientSecretWo: "string",
        clientSecretWoVersion: 0,
        issuer: "string",
        requestedScopes: ["string"],
        upstreamOauthMode: "string",
    });
    
    type: formal:ResourceOauthSettings
    properties:
        clientId: string
        clientSecret: string
        clientSecretWo: string
        clientSecretWoVersion: 0
        issuer: string
        requestedScopes:
            - string
        resourceId: string
        upstreamOauthMode: string
    

    ResourceOauthSettings Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ResourceOauthSettings resource accepts the following input properties:

    ResourceId string
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    ClientId string
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    ClientSecret string
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    ClientSecretWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    ClientSecretWoVersion int
    Version trigger for clientSecretWo. Increment this value to update the secret.
    Issuer string
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    RequestedScopes List<string>
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    UpstreamOauthMode string
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.
    ResourceId string
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    ClientId string
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    ClientSecret string
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    ClientSecretWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    ClientSecretWoVersion int
    Version trigger for clientSecretWo. Increment this value to update the secret.
    Issuer string
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    RequestedScopes []string
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    UpstreamOauthMode string
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.
    resource_id string
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    client_id string
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    client_secret string
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    client_secret_wo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    client_secret_wo_version number
    Version trigger for clientSecretWo. Increment this value to update the secret.
    issuer string
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    requested_scopes list(string)
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    upstream_oauth_mode string
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.
    resourceId String
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    clientId String
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    clientSecret String
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    clientSecretWo String
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    clientSecretWoVersion Integer
    Version trigger for clientSecretWo. Increment this value to update the secret.
    issuer String
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    requestedScopes List<String>
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    upstreamOauthMode String
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.
    resourceId string
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    clientId string
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    clientSecret string
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    clientSecretWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    clientSecretWoVersion number
    Version trigger for clientSecretWo. Increment this value to update the secret.
    issuer string
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    requestedScopes string[]
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    upstreamOauthMode string
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.
    resource_id str
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    client_id str
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    client_secret str
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    client_secret_wo str
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    client_secret_wo_version int
    Version trigger for clientSecretWo. Increment this value to update the secret.
    issuer str
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    requested_scopes Sequence[str]
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    upstream_oauth_mode str
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.
    resourceId String
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    clientId String
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    clientSecret String
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    clientSecretWo String
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    clientSecretWoVersion Number
    Version trigger for clientSecretWo. Increment this value to update the secret.
    issuer String
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    requestedScopes List<String>
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    upstreamOauthMode String
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ResourceOauthSettings resource produces the following output properties:

    ClientSecretSet bool
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    CreatedAt string
    When the OAuth settings were created.
    Id string
    The provider-assigned unique ID for this managed resource.
    OauthSettingsId string
    The ID of the OAuth settings.
    RegisteredClientId string
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    UpdatedAt string
    When the OAuth settings were last updated.
    ClientSecretSet bool
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    CreatedAt string
    When the OAuth settings were created.
    Id string
    The provider-assigned unique ID for this managed resource.
    OauthSettingsId string
    The ID of the OAuth settings.
    RegisteredClientId string
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    UpdatedAt string
    When the OAuth settings were last updated.
    client_secret_set bool
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    created_at string
    When the OAuth settings were created.
    id string
    The provider-assigned unique ID for this managed resource.
    oauth_settings_id string
    The ID of the OAuth settings.
    registered_client_id string
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    updated_at string
    When the OAuth settings were last updated.
    clientSecretSet Boolean
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    createdAt String
    When the OAuth settings were created.
    id String
    The provider-assigned unique ID for this managed resource.
    oauthSettingsId String
    The ID of the OAuth settings.
    registeredClientId String
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    updatedAt String
    When the OAuth settings were last updated.
    clientSecretSet boolean
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    createdAt string
    When the OAuth settings were created.
    id string
    The provider-assigned unique ID for this managed resource.
    oauthSettingsId string
    The ID of the OAuth settings.
    registeredClientId string
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    updatedAt string
    When the OAuth settings were last updated.
    client_secret_set bool
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    created_at str
    When the OAuth settings were created.
    id str
    The provider-assigned unique ID for this managed resource.
    oauth_settings_id str
    The ID of the OAuth settings.
    registered_client_id str
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    updated_at str
    When the OAuth settings were last updated.
    clientSecretSet Boolean
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    createdAt String
    When the OAuth settings were created.
    id String
    The provider-assigned unique ID for this managed resource.
    oauthSettingsId String
    The ID of the OAuth settings.
    registeredClientId String
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    updatedAt String
    When the OAuth settings were last updated.

    Look up Existing ResourceOauthSettings Resource

    Get an existing ResourceOauthSettings resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ResourceOauthSettingsState, opts?: CustomResourceOptions): ResourceOauthSettings
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            client_id: Optional[str] = None,
            client_secret: Optional[str] = None,
            client_secret_set: Optional[bool] = None,
            client_secret_wo: Optional[str] = None,
            client_secret_wo_version: Optional[int] = None,
            created_at: Optional[str] = None,
            issuer: Optional[str] = None,
            oauth_settings_id: Optional[str] = None,
            registered_client_id: Optional[str] = None,
            requested_scopes: Optional[Sequence[str]] = None,
            resource_id: Optional[str] = None,
            updated_at: Optional[str] = None,
            upstream_oauth_mode: Optional[str] = None) -> ResourceOauthSettings
    func GetResourceOauthSettings(ctx *Context, name string, id IDInput, state *ResourceOauthSettingsState, opts ...ResourceOption) (*ResourceOauthSettings, error)
    public static ResourceOauthSettings Get(string name, Input<string> id, ResourceOauthSettingsState? state, CustomResourceOptions? opts = null)
    public static ResourceOauthSettings get(String name, Output<String> id, ResourceOauthSettingsState state, CustomResourceOptions options)
    resources:  _:    type: formal:ResourceOauthSettings    get:      id: ${id}
    import {
      to = formal_resource_oauth_settings.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ClientId string
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    ClientSecret string
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    ClientSecretSet bool
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    ClientSecretWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    ClientSecretWoVersion int
    Version trigger for clientSecretWo. Increment this value to update the secret.
    CreatedAt string
    When the OAuth settings were created.
    Issuer string
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    OauthSettingsId string
    The ID of the OAuth settings.
    RegisteredClientId string
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    RequestedScopes List<string>
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    ResourceId string
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    UpdatedAt string
    When the OAuth settings were last updated.
    UpstreamOauthMode string
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.
    ClientId string
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    ClientSecret string
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    ClientSecretSet bool
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    ClientSecretWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    ClientSecretWoVersion int
    Version trigger for clientSecretWo. Increment this value to update the secret.
    CreatedAt string
    When the OAuth settings were created.
    Issuer string
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    OauthSettingsId string
    The ID of the OAuth settings.
    RegisteredClientId string
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    RequestedScopes []string
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    ResourceId string
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    UpdatedAt string
    When the OAuth settings were last updated.
    UpstreamOauthMode string
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.
    client_id string
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    client_secret string
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    client_secret_set bool
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    client_secret_wo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    client_secret_wo_version number
    Version trigger for clientSecretWo. Increment this value to update the secret.
    created_at string
    When the OAuth settings were created.
    issuer string
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    oauth_settings_id string
    The ID of the OAuth settings.
    registered_client_id string
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    requested_scopes list(string)
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    resource_id string
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    updated_at string
    When the OAuth settings were last updated.
    upstream_oauth_mode string
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.
    clientId String
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    clientSecret String
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    clientSecretSet Boolean
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    clientSecretWo String
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    clientSecretWoVersion Integer
    Version trigger for clientSecretWo. Increment this value to update the secret.
    createdAt String
    When the OAuth settings were created.
    issuer String
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    oauthSettingsId String
    The ID of the OAuth settings.
    registeredClientId String
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    requestedScopes List<String>
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    resourceId String
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    updatedAt String
    When the OAuth settings were last updated.
    upstreamOauthMode String
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.
    clientId string
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    clientSecret string
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    clientSecretSet boolean
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    clientSecretWo string
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    clientSecretWoVersion number
    Version trigger for clientSecretWo. Increment this value to update the secret.
    createdAt string
    When the OAuth settings were created.
    issuer string
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    oauthSettingsId string
    The ID of the OAuth settings.
    registeredClientId string
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    requestedScopes string[]
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    resourceId string
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    updatedAt string
    When the OAuth settings were last updated.
    upstreamOauthMode string
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.
    client_id str
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    client_secret str
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    client_secret_set bool
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    client_secret_wo str
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    client_secret_wo_version int
    Version trigger for clientSecretWo. Increment this value to update the secret.
    created_at str
    When the OAuth settings were created.
    issuer str
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    oauth_settings_id str
    The ID of the OAuth settings.
    registered_client_id str
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    requested_scopes Sequence[str]
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    resource_id str
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    updated_at str
    When the OAuth settings were last updated.
    upstream_oauth_mode str
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.
    clientId String
    The client ID of your OAuth app. Required when upstreamOauthMode is preRegistered, and not allowed otherwise. Register the Formal redirect URI shown in the console with the authorization server.
    clientSecret String
    The client secret of your OAuth app. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. The API never returns it, so it is not read back, and Terraform only sends it when it changes. Rotating or removing it keeps linked accounts. Prefer clientSecretWo to keep the secret out of Terraform state.
    clientSecretSet Boolean
    Whether the OAuth app, or the dynamically registered client, has a client secret.
    clientSecretWo String
    NOTE: This field is write-only and its value will not be updated in state as part of read operations. Write-only client secret of your OAuth app. This value is not stored in Terraform state, so it must stay in the configuration. Requires Terraform 1.11+ and clientSecretWoVersion. Leave unset for a public client, which authenticates with PKCE alone. Only allowed when upstreamOauthMode is preRegistered. Set it to an empty string and increment clientSecretWoVersion to make the client public. Rotating or removing the secret keeps linked accounts.
    clientSecretWoVersion Number
    Version trigger for clientSecretWo. Increment this value to update the secret.
    createdAt String
    When the OAuth settings were created.
    issuer String
    The upstream authorization server's issuer, such as https://github.com/login/oauth for the GitHub REST API. Set it when the upstream publishes no protected resource metadata (RFC 9728): Formal then reads the issuer's authorization server metadata directly. It must use https, have no query or fragment, and exactly match the issuer the metadata reports. When unset, the authorization server is discovered from the upstream itself. Not allowed when upstreamOauthMode is none.
    oauthSettingsId String
    The ID of the OAuth settings.
    registeredClientId String
    The client ID the authorization server issued when upstreamOauthMode is dcr; empty otherwise.
    requestedScopes List<String>
    Scopes to request from the upstream authorization server. When empty, the scope parameter is omitted and the provider's defaults apply. Must be empty when upstreamOauthMode is none. Existing linked accounts keep the scopes they were granted; users get these scopes the next time they link.
    resourceId String
    The ID of the Resource to enable OAuth on. Its technology must be mcp, http, grpc or llm.
    updatedAt String
    When the OAuth settings were last updated.
    upstreamOauthMode String
    How Formal identifies itself to the upstream authorization server when users link their accounts. formal (the default) uses Formal's OAuth app: a client Formal registered with the authorization server when there is one, and otherwise its Client ID Metadata Document client. preRegistered uses an OAuth app your organization registered with the authorization server, set with clientId and clientSecret or clientSecretWo. dcr registers a client for these settings with the authorization server's dynamic client registration endpoint (RFC 7591) on create, and fails if the server offers none or rejects the registration; its ID is registeredClientId. none links no upstream account: the Connector authenticates upstream with the user's native user.

    Import

    The pulumi import command can be used, for example:

    OAuth settings are imported by the ID of their Resource. The client secret is never returned. clientSecretWo stays out of state; increment clientSecretWoVersion to send it.

    $ pulumi import formal:index/resourceOauthSettings:ResourceOauthSettings github <resource_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    formal formalco/pulumi-formal
    License
    MPL-2.0
    Notes
    This Pulumi package is based on the formal Terraform Provider.
    formal logo Formal
    Viewing docs for Formal v1.2.9
    published on Saturday, Nov 14, 2026 by Formal

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial