Okta

Pulumi Official
Package maintained by Pulumi
v3.15.0 published on Tuesday, Aug 16, 2022 by Pulumi

AppSamlAppSettings

This resource allows you to manage app settings of the SAML Application . It’s basically the same as app_settings_json field in okta.app.Saml resource and can be used in cases where settings require to be managed separately.

Example Usage

using System.Collections.Generic;
using System.Text.Json;
using Pulumi;
using Okta = Pulumi.Okta;

return await Deployment.RunAsync(() => 
{
    var testSaml = new Okta.App.Saml("testSaml", new()
    {
        PreconfiguredApp = "amazon_aws",
        Label = "Amazon AWS",
        Status = "ACTIVE",
    });

    var testAppSamlAppSettings = new Okta.AppSamlAppSettings("testAppSamlAppSettings", new()
    {
        AppId = testSaml.Id,
        Settings = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["appFilter"] = "okta",
            ["awsEnvironmentType"] = "aws.amazon",
            ["groupFilter"] = "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)",
            ["joinAllRoles"] = false,
            ["loginURL"] = "https://console.aws.amazon.com/ec2/home",
            ["roleValuePattern"] = $"arn:aws:iam::{accountid}:saml-provider/OKTA,arn:aws:iam::{accountid}:role/{role}",
            ["sessionDuration"] = 3200,
            ["useGroupMapping"] = false,
        }),
    });

});
package main

import (
	"encoding/json"
	"fmt"

	"github.com/pulumi/pulumi-okta/sdk/v3/go/okta"
	"github.com/pulumi/pulumi-okta/sdk/v3/go/okta/app"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		testSaml, err := app.NewSaml(ctx, "testSaml", &app.SamlArgs{
			PreconfiguredApp: pulumi.String("amazon_aws"),
			Label:            pulumi.String("Amazon AWS"),
			Status:           pulumi.String("ACTIVE"),
		})
		if err != nil {
			return err
		}
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"appFilter":          "okta",
			"awsEnvironmentType": "aws.amazon",
			"groupFilter":        "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)",
			"joinAllRoles":       false,
			"loginURL":           "https://console.aws.amazon.com/ec2/home",
			"roleValuePattern":   fmt.Sprintf("arn:aws:iam::%v:saml-provider/OKTA,arn:aws:iam::%v:role/%v", accountid, accountid, role),
			"sessionDuration":    3200,
			"useGroupMapping":    false,
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = okta.NewAppSamlAppSettings(ctx, "testAppSamlAppSettings", &okta.AppSamlAppSettingsArgs{
			AppId:    testSaml.ID(),
			Settings: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.okta.app.Saml;
import com.pulumi.okta.app.SamlArgs;
import com.pulumi.okta.AppSamlAppSettings;
import com.pulumi.okta.AppSamlAppSettingsArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 testSaml = new Saml("testSaml", SamlArgs.builder()        
            .preconfiguredApp("amazon_aws")
            .label("Amazon AWS")
            .status("ACTIVE")
            .build());

        var testAppSamlAppSettings = new AppSamlAppSettings("testAppSamlAppSettings", AppSamlAppSettingsArgs.builder()        
            .appId(testSaml.id())
            .settings(serializeJson(
                jsonObject(
                    jsonProperty("appFilter", "okta"),
                    jsonProperty("awsEnvironmentType", "aws.amazon"),
                    jsonProperty("groupFilter", "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)"),
                    jsonProperty("joinAllRoles", false),
                    jsonProperty("loginURL", "https://console.aws.amazon.com/ec2/home"),
                    jsonProperty("roleValuePattern", String.format("arn:aws:iam::%s:saml-provider/OKTA,arn:aws:iam::%s:role/%s", accountid,accountid,role)),
                    jsonProperty("sessionDuration", 3200),
                    jsonProperty("useGroupMapping", false)
                )))
            .build());

    }
}
import pulumi
import json
import pulumi_okta as okta

test_saml = okta.app.Saml("testSaml",
    preconfigured_app="amazon_aws",
    label="Amazon AWS",
    status="ACTIVE")
test_app_saml_app_settings = okta.AppSamlAppSettings("testAppSamlAppSettings",
    app_id=test_saml.id,
    settings=json.dumps({
        "appFilter": "okta",
        "awsEnvironmentType": "aws.amazon",
        "groupFilter": "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)",
        "joinAllRoles": False,
        "loginURL": "https://console.aws.amazon.com/ec2/home",
        "roleValuePattern": f"arn:aws:iam::{accountid}:saml-provider/OKTA,arn:aws:iam::{accountid}:role/{role}",
        "sessionDuration": 3200,
        "useGroupMapping": False,
    }))
import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

const testSaml = new okta.app.Saml("testSaml", {
    preconfiguredApp: "amazon_aws",
    label: "Amazon AWS",
    status: "ACTIVE",
});
const testAppSamlAppSettings = new okta.AppSamlAppSettings("testAppSamlAppSettings", {
    appId: testSaml.id,
    settings: JSON.stringify({
        appFilter: "okta",
        awsEnvironmentType: "aws.amazon",
        groupFilter: "aws_(?{{accountid}}\\\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\\\-_]+)",
        joinAllRoles: false,
        loginURL: "https://console.aws.amazon.com/ec2/home",
        roleValuePattern: `arn:aws:iam::${accountid}:saml-provider/OKTA,arn:aws:iam::${accountid}:role/${role}`,
        sessionDuration: 3200,
        useGroupMapping: false,
    }),
});
resources:
  testSaml:
    type: okta:app:Saml
    properties:
      preconfiguredApp: amazon_aws
      label: Amazon AWS
      status: ACTIVE
  testAppSamlAppSettings:
    type: okta:AppSamlAppSettings
    properties:
      appId: ${testSaml.id}
      settings:
        Fn::ToJSON:
          appFilter: okta
          awsEnvironmentType: aws.amazon
          groupFilter: aws_(?{{accountid}}\\d+)_(?{{role}}[a-zA-Z0-9+=,.@\\-_]+)
          joinAllRoles: false
          loginURL: https://console.aws.amazon.com/ec2/home
          roleValuePattern: arn:aws:iam::${accountid}:saml-provider/OKTA,arn:aws:iam::${accountid}:role/${role}
          sessionDuration: 3200
          useGroupMapping: false

Create a AppSamlAppSettings Resource

new AppSamlAppSettings(name: string, args: AppSamlAppSettingsArgs, opts?: CustomResourceOptions);
@overload
def AppSamlAppSettings(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       app_id: Optional[str] = None,
                       settings: Optional[str] = None)
@overload
def AppSamlAppSettings(resource_name: str,
                       args: AppSamlAppSettingsArgs,
                       opts: Optional[ResourceOptions] = None)
func NewAppSamlAppSettings(ctx *Context, name string, args AppSamlAppSettingsArgs, opts ...ResourceOption) (*AppSamlAppSettings, error)
public AppSamlAppSettings(string name, AppSamlAppSettingsArgs args, CustomResourceOptions? opts = null)
public AppSamlAppSettings(String name, AppSamlAppSettingsArgs args)
public AppSamlAppSettings(String name, AppSamlAppSettingsArgs args, CustomResourceOptions options)
type: okta:AppSamlAppSettings
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AppSamlAppSettingsArgs
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 AppSamlAppSettingsArgs
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 AppSamlAppSettingsArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AppSamlAppSettingsArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AppSamlAppSettingsArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AppSamlAppSettings Resource Properties

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

Inputs

The AppSamlAppSettings resource accepts the following input properties:

AppId string

ID of the application.

Settings string

Application settings in JSON format.

AppId string

ID of the application.

Settings string

Application settings in JSON format.

appId String

ID of the application.

settings String

Application settings in JSON format.

appId string

ID of the application.

settings string

Application settings in JSON format.

app_id str

ID of the application.

settings str

Application settings in JSON format.

appId String

ID of the application.

settings String

Application settings in JSON format.

Outputs

All input properties are implicitly available as output properties. Additionally, the AppSamlAppSettings 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 an Existing AppSamlAppSettings Resource

Get an existing AppSamlAppSettings 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?: AppSamlAppSettingsState, opts?: CustomResourceOptions): AppSamlAppSettings
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        app_id: Optional[str] = None,
        settings: Optional[str] = None) -> AppSamlAppSettings
func GetAppSamlAppSettings(ctx *Context, name string, id IDInput, state *AppSamlAppSettingsState, opts ...ResourceOption) (*AppSamlAppSettings, error)
public static AppSamlAppSettings Get(string name, Input<string> id, AppSamlAppSettingsState? state, CustomResourceOptions? opts = null)
public static AppSamlAppSettings get(String name, Output<String> id, AppSamlAppSettingsState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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:
AppId string

ID of the application.

Settings string

Application settings in JSON format.

AppId string

ID of the application.

Settings string

Application settings in JSON format.

appId String

ID of the application.

settings String

Application settings in JSON format.

appId string

ID of the application.

settings string

Application settings in JSON format.

app_id str

ID of the application.

settings str

Application settings in JSON format.

appId String

ID of the application.

settings String

Application settings in JSON format.

Import

A settings for the SAML App can be imported via the Okta ID.

 $ pulumi import okta:index/appSamlAppSettings:AppSamlAppSettings example &#60;app id&#62;

Package Details

Repository
https://github.com/pulumi/pulumi-okta
License
Apache-2.0
Notes

This Pulumi package is based on the okta Terraform Provider.