1. Packages
  2. Okta Provider
  3. API Docs
  4. trustedorigin
  5. Origin
Okta v4.16.0 published on Wednesday, Apr 9, 2025 by Pulumi

okta.trustedorigin.Origin

Explore with Pulumi AI

Creates a Trusted Origin. This resource allows you to create and configure a Trusted Origin.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

const example = new okta.trustedorigin.Origin("example", {
    name: "example",
    origin: "https://example.com",
    scopes: ["CORS"],
});
Copy
import pulumi
import pulumi_okta as okta

example = okta.trustedorigin.Origin("example",
    name="example",
    origin="https://example.com",
    scopes=["CORS"])
Copy
package main

import (
	"github.com/pulumi/pulumi-okta/sdk/v4/go/okta/trustedorigin"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := trustedorigin.NewOrigin(ctx, "example", &trustedorigin.OriginArgs{
			Name:   pulumi.String("example"),
			Origin: pulumi.String("https://example.com"),
			Scopes: pulumi.StringArray{
				pulumi.String("CORS"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Okta = Pulumi.Okta;

return await Deployment.RunAsync(() => 
{
    var example = new Okta.TrustedOrigin.Origin("example", new()
    {
        Name = "example",
        OriginName = "https://example.com",
        Scopes = new[]
        {
            "CORS",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.trustedorigin.Origin;
import com.pulumi.okta.trustedorigin.OriginArgs;
import java.util.List;
import java.util.ArrayList;
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) {
        var example = new Origin("example", OriginArgs.builder()
            .name("example")
            .origin("https://example.com")
            .scopes("CORS")
            .build());

    }
}
Copy
resources:
  example:
    type: okta:trustedorigin:Origin
    properties:
      name: example
      origin: https://example.com
      scopes:
        - CORS
Copy

Create Origin Resource

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

Constructor syntax

new Origin(name: string, args: OriginArgs, opts?: CustomResourceOptions);
@overload
def Origin(resource_name: str,
           args: OriginArgs,
           opts: Optional[ResourceOptions] = None)

@overload
def Origin(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           origin: Optional[str] = None,
           scopes: Optional[Sequence[str]] = None,
           active: Optional[bool] = None,
           name: Optional[str] = None)
func NewOrigin(ctx *Context, name string, args OriginArgs, opts ...ResourceOption) (*Origin, error)
public Origin(string name, OriginArgs args, CustomResourceOptions? opts = null)
public Origin(String name, OriginArgs args)
public Origin(String name, OriginArgs args, CustomResourceOptions options)
type: okta:trustedorigin:Origin
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. OriginArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. OriginArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. OriginArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. OriginArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. OriginArgs
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 originResource = new Okta.TrustedOrigin.Origin("originResource", new()
{
    OriginName = "string",
    Scopes = new[]
    {
        "string",
    },
    Active = false,
    Name = "string",
});
Copy
example, err := trustedorigin.NewOrigin(ctx, "originResource", &trustedorigin.OriginArgs{
	Origin: pulumi.String("string"),
	Scopes: pulumi.StringArray{
		pulumi.String("string"),
	},
	Active: pulumi.Bool(false),
	Name:   pulumi.String("string"),
})
Copy
var originResource = new Origin("originResource", OriginArgs.builder()
    .origin("string")
    .scopes("string")
    .active(false)
    .name("string")
    .build());
Copy
origin_resource = okta.trustedorigin.Origin("originResource",
    origin="string",
    scopes=["string"],
    active=False,
    name="string")
Copy
const originResource = new okta.trustedorigin.Origin("originResource", {
    origin: "string",
    scopes: ["string"],
    active: false,
    name: "string",
});
Copy
type: okta:trustedorigin:Origin
properties:
    active: false
    name: string
    origin: string
    scopes:
        - string
Copy

Origin 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 Origin resource accepts the following input properties:

OriginName This property is required. string
Unique origin URL for this trusted origin
Scopes This property is required. List<string>
Scopes of the Trusted Origin - can either be CORS and/or REDIRECT
Active bool
Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is true.
Name string
Unique name for this trusted origin
Origin This property is required. string
Unique origin URL for this trusted origin
Scopes This property is required. []string
Scopes of the Trusted Origin - can either be CORS and/or REDIRECT
Active bool
Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is true.
Name string
Unique name for this trusted origin
origin This property is required. String
Unique origin URL for this trusted origin
scopes This property is required. List<String>
Scopes of the Trusted Origin - can either be CORS and/or REDIRECT
active Boolean
Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is true.
name String
Unique name for this trusted origin
origin This property is required. string
Unique origin URL for this trusted origin
scopes This property is required. string[]
Scopes of the Trusted Origin - can either be CORS and/or REDIRECT
active boolean
Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is true.
name string
Unique name for this trusted origin
origin This property is required. str
Unique origin URL for this trusted origin
scopes This property is required. Sequence[str]
Scopes of the Trusted Origin - can either be CORS and/or REDIRECT
active bool
Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is true.
name str
Unique name for this trusted origin
origin This property is required. String
Unique origin URL for this trusted origin
scopes This property is required. List<String>
Scopes of the Trusted Origin - can either be CORS and/or REDIRECT
active Boolean
Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is true.
name String
Unique name for this trusted origin

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing Origin Resource

Get an existing Origin 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?: OriginState, opts?: CustomResourceOptions): Origin
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        active: Optional[bool] = None,
        name: Optional[str] = None,
        origin: Optional[str] = None,
        scopes: Optional[Sequence[str]] = None) -> Origin
func GetOrigin(ctx *Context, name string, id IDInput, state *OriginState, opts ...ResourceOption) (*Origin, error)
public static Origin Get(string name, Input<string> id, OriginState? state, CustomResourceOptions? opts = null)
public static Origin get(String name, Output<String> id, OriginState state, CustomResourceOptions options)
resources:  _:    type: okta:trustedorigin:Origin    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Active bool
Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is true.
Name string
Unique name for this trusted origin
OriginName string
Unique origin URL for this trusted origin
Scopes List<string>
Scopes of the Trusted Origin - can either be CORS and/or REDIRECT
Active bool
Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is true.
Name string
Unique name for this trusted origin
Origin string
Unique origin URL for this trusted origin
Scopes []string
Scopes of the Trusted Origin - can either be CORS and/or REDIRECT
active Boolean
Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is true.
name String
Unique name for this trusted origin
origin String
Unique origin URL for this trusted origin
scopes List<String>
Scopes of the Trusted Origin - can either be CORS and/or REDIRECT
active boolean
Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is true.
name string
Unique name for this trusted origin
origin string
Unique origin URL for this trusted origin
scopes string[]
Scopes of the Trusted Origin - can either be CORS and/or REDIRECT
active bool
Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is true.
name str
Unique name for this trusted origin
origin str
Unique origin URL for this trusted origin
scopes Sequence[str]
Scopes of the Trusted Origin - can either be CORS and/or REDIRECT
active Boolean
Whether the Trusted Origin is active or not - can only be issued post-creation. By default, it is true.
name String
Unique name for this trusted origin
origin String
Unique origin URL for this trusted origin
scopes List<String>
Scopes of the Trusted Origin - can either be CORS and/or REDIRECT

Import

$ pulumi import okta:trustedorigin/origin:Origin example <trusted_origin_id>
Copy

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

Package Details

Repository
Okta pulumi/pulumi-okta
License
Apache-2.0
Notes
This Pulumi package is based on the okta Terraform Provider.