Provides a resource to manage iam oauth provider
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const foo = new volcengine.iam.OauthProvider("foo", {
authorizeTemplate: "${authEndpoint}?client_id=${clientId}&scope=${scope}&response_type=code&state=12345",
authorizeUrl: "https://example.com/authorize_modify",
clientId: "test_client_id_modify",
clientSecret: "",
description: "acc-test-modify",
identityMapType: 1,
idpIdentityKey: "username_modify",
oauthProviderName: "acc-test-oauth",
scope: "openid",
ssoType: 2,
status: 1,
tokenUrl: "https://example.com/access_token_modify",
userInfoUrl: "https://example.com/user_info_modify",
});
import pulumi
import pulumi_volcengine as volcengine
foo = volcengine.iam.OauthProvider("foo",
authorize_template="${authEndpoint}?client_id=${clientId}&scope=${scope}&response_type=code&state=12345",
authorize_url="https://example.com/authorize_modify",
client_id="test_client_id_modify",
client_secret="",
description="acc-test-modify",
identity_map_type=1,
idp_identity_key="username_modify",
oauth_provider_name="acc-test-oauth",
scope="openid",
sso_type=2,
status=1,
token_url="https://example.com/access_token_modify",
user_info_url="https://example.com/user_info_modify")
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/iam"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := iam.NewOauthProvider(ctx, "foo", &iam.OauthProviderArgs{
AuthorizeTemplate: pulumi.String("${authEndpoint}?client_id=${clientId}&scope=${scope}&response_type=code&state=12345"),
AuthorizeUrl: pulumi.String("https://example.com/authorize_modify"),
ClientId: pulumi.String("test_client_id_modify"),
ClientSecret: pulumi.String(""),
Description: pulumi.String("acc-test-modify"),
IdentityMapType: pulumi.Int(1),
IdpIdentityKey: pulumi.String("username_modify"),
OauthProviderName: pulumi.String("acc-test-oauth"),
Scope: pulumi.String("openid"),
SsoType: pulumi.Int(2),
Status: pulumi.Int(1),
TokenUrl: pulumi.String("https://example.com/access_token_modify"),
UserInfoUrl: pulumi.String("https://example.com/user_info_modify"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Volcengine = Pulumi.Volcengine;
return await Deployment.RunAsync(() =>
{
var foo = new Volcengine.Iam.OauthProvider("foo", new()
{
AuthorizeTemplate = "${authEndpoint}?client_id=${clientId}&scope=${scope}&response_type=code&state=12345",
AuthorizeUrl = "https://example.com/authorize_modify",
ClientId = "test_client_id_modify",
ClientSecret = "",
Description = "acc-test-modify",
IdentityMapType = 1,
IdpIdentityKey = "username_modify",
OauthProviderName = "acc-test-oauth",
Scope = "openid",
SsoType = 2,
Status = 1,
TokenUrl = "https://example.com/access_token_modify",
UserInfoUrl = "https://example.com/user_info_modify",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.iam.OauthProvider;
import com.pulumi.volcengine.iam.OauthProviderArgs;
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 foo = new OauthProvider("foo", OauthProviderArgs.builder()
.authorizeTemplate("${authEndpoint}?client_id=${clientId}&scope=${scope}&response_type=code&state=12345")
.authorizeUrl("https://example.com/authorize_modify")
.clientId("test_client_id_modify")
.clientSecret("")
.description("acc-test-modify")
.identityMapType(1)
.idpIdentityKey("username_modify")
.oauthProviderName("acc-test-oauth")
.scope("openid")
.ssoType(2)
.status(1)
.tokenUrl("https://example.com/access_token_modify")
.userInfoUrl("https://example.com/user_info_modify")
.build());
}
}
resources:
foo:
type: volcengine:iam:OauthProvider
properties:
authorizeTemplate: ${authEndpoint}?client_id=${clientId}&scope=${scope}&response_type=code&state=12345
authorizeUrl: https://example.com/authorize_modify
clientId: test_client_id_modify
clientSecret:
description: acc-test-modify
identityMapType: 1
idpIdentityKey: username_modify
oauthProviderName: acc-test-oauth
scope: openid
ssoType: 2
status: 1
tokenUrl: https://example.com/access_token_modify
userInfoUrl: https://example.com/user_info_modify
Create OauthProvider Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new OauthProvider(name: string, args: OauthProviderArgs, opts?: CustomResourceOptions);@overload
def OauthProvider(resource_name: str,
args: OauthProviderArgs,
opts: Optional[ResourceOptions] = None)
@overload
def OauthProvider(resource_name: str,
opts: Optional[ResourceOptions] = None,
idp_identity_key: Optional[str] = None,
authorize_url: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
identity_map_type: Optional[int] = None,
authorize_template: Optional[str] = None,
oauth_provider_name: Optional[str] = None,
sso_type: Optional[int] = None,
token_url: Optional[str] = None,
user_info_url: Optional[str] = None,
description: Optional[str] = None,
scope: Optional[str] = None,
status: Optional[int] = None)func NewOauthProvider(ctx *Context, name string, args OauthProviderArgs, opts ...ResourceOption) (*OauthProvider, error)public OauthProvider(string name, OauthProviderArgs args, CustomResourceOptions? opts = null)
public OauthProvider(String name, OauthProviderArgs args)
public OauthProvider(String name, OauthProviderArgs args, CustomResourceOptions options)
type: volcengine:iam:OauthProvider
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args OauthProviderArgs
- 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 OauthProviderArgs
- 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 OauthProviderArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args OauthProviderArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args OauthProviderArgs
- 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 oauthProviderResource = new Volcengine.Iam.OauthProvider("oauthProviderResource", new()
{
IdpIdentityKey = "string",
AuthorizeUrl = "string",
ClientId = "string",
ClientSecret = "string",
IdentityMapType = 0,
AuthorizeTemplate = "string",
OauthProviderName = "string",
SsoType = 0,
TokenUrl = "string",
UserInfoUrl = "string",
Description = "string",
Scope = "string",
Status = 0,
});
example, err := iam.NewOauthProvider(ctx, "oauthProviderResource", &iam.OauthProviderArgs{
IdpIdentityKey: pulumi.String("string"),
AuthorizeUrl: pulumi.String("string"),
ClientId: pulumi.String("string"),
ClientSecret: pulumi.String("string"),
IdentityMapType: pulumi.Int(0),
AuthorizeTemplate: pulumi.String("string"),
OauthProviderName: pulumi.String("string"),
SsoType: pulumi.Int(0),
TokenUrl: pulumi.String("string"),
UserInfoUrl: pulumi.String("string"),
Description: pulumi.String("string"),
Scope: pulumi.String("string"),
Status: pulumi.Int(0),
})
var oauthProviderResource = new OauthProvider("oauthProviderResource", OauthProviderArgs.builder()
.idpIdentityKey("string")
.authorizeUrl("string")
.clientId("string")
.clientSecret("string")
.identityMapType(0)
.authorizeTemplate("string")
.oauthProviderName("string")
.ssoType(0)
.tokenUrl("string")
.userInfoUrl("string")
.description("string")
.scope("string")
.status(0)
.build());
oauth_provider_resource = volcengine.iam.OauthProvider("oauthProviderResource",
idp_identity_key="string",
authorize_url="string",
client_id="string",
client_secret="string",
identity_map_type=0,
authorize_template="string",
oauth_provider_name="string",
sso_type=0,
token_url="string",
user_info_url="string",
description="string",
scope="string",
status=0)
const oauthProviderResource = new volcengine.iam.OauthProvider("oauthProviderResource", {
idpIdentityKey: "string",
authorizeUrl: "string",
clientId: "string",
clientSecret: "string",
identityMapType: 0,
authorizeTemplate: "string",
oauthProviderName: "string",
ssoType: 0,
tokenUrl: "string",
userInfoUrl: "string",
description: "string",
scope: "string",
status: 0,
});
type: volcengine:iam:OauthProvider
properties:
authorizeTemplate: string
authorizeUrl: string
clientId: string
clientSecret: string
description: string
identityMapType: 0
idpIdentityKey: string
oauthProviderName: string
scope: string
ssoType: 0
status: 0
tokenUrl: string
userInfoUrl: string
OauthProvider 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 OauthProvider resource accepts the following input properties:
- string
- The authorize template of the OAuth provider.
- string
- The authorize url of the OAuth provider.
- Client
Id string - The client id of the OAuth provider.
- Client
Secret string - The client secret of the OAuth provider.
- Identity
Map intType - The identity map type of the OAuth provider.
- Idp
Identity stringKey - The idp identity key of the OAuth provider.
- Oauth
Provider stringName - The name of the OAuth provider.
- Sso
Type int - The SSO type of the OAuth provider.
- Token
Url string - The token url of the OAuth provider.
- User
Info stringUrl - The user info url of the OAuth provider.
- Description string
- The description of the OAuth provider.
- Scope string
- The scope of the OAuth provider.
- Status int
- The status of the OAuth provider.
- string
- The authorize template of the OAuth provider.
- string
- The authorize url of the OAuth provider.
- Client
Id string - The client id of the OAuth provider.
- Client
Secret string - The client secret of the OAuth provider.
- Identity
Map intType - The identity map type of the OAuth provider.
- Idp
Identity stringKey - The idp identity key of the OAuth provider.
- Oauth
Provider stringName - The name of the OAuth provider.
- Sso
Type int - The SSO type of the OAuth provider.
- Token
Url string - The token url of the OAuth provider.
- User
Info stringUrl - The user info url of the OAuth provider.
- Description string
- The description of the OAuth provider.
- Scope string
- The scope of the OAuth provider.
- Status int
- The status of the OAuth provider.
- String
- The authorize template of the OAuth provider.
- String
- The authorize url of the OAuth provider.
- client
Id String - The client id of the OAuth provider.
- client
Secret String - The client secret of the OAuth provider.
- identity
Map IntegerType - The identity map type of the OAuth provider.
- idp
Identity StringKey - The idp identity key of the OAuth provider.
- oauth
Provider StringName - The name of the OAuth provider.
- sso
Type Integer - The SSO type of the OAuth provider.
- token
Url String - The token url of the OAuth provider.
- user
Info StringUrl - The user info url of the OAuth provider.
- description String
- The description of the OAuth provider.
- scope String
- The scope of the OAuth provider.
- status Integer
- The status of the OAuth provider.
- string
- The authorize template of the OAuth provider.
- string
- The authorize url of the OAuth provider.
- client
Id string - The client id of the OAuth provider.
- client
Secret string - The client secret of the OAuth provider.
- identity
Map numberType - The identity map type of the OAuth provider.
- idp
Identity stringKey - The idp identity key of the OAuth provider.
- oauth
Provider stringName - The name of the OAuth provider.
- sso
Type number - The SSO type of the OAuth provider.
- token
Url string - The token url of the OAuth provider.
- user
Info stringUrl - The user info url of the OAuth provider.
- description string
- The description of the OAuth provider.
- scope string
- The scope of the OAuth provider.
- status number
- The status of the OAuth provider.
- str
- The authorize template of the OAuth provider.
- str
- The authorize url of the OAuth provider.
- client_
id str - The client id of the OAuth provider.
- client_
secret str - The client secret of the OAuth provider.
- identity_
map_ inttype - The identity map type of the OAuth provider.
- idp_
identity_ strkey - The idp identity key of the OAuth provider.
- oauth_
provider_ strname - The name of the OAuth provider.
- sso_
type int - The SSO type of the OAuth provider.
- token_
url str - The token url of the OAuth provider.
- user_
info_ strurl - The user info url of the OAuth provider.
- description str
- The description of the OAuth provider.
- scope str
- The scope of the OAuth provider.
- status int
- The status of the OAuth provider.
- String
- The authorize template of the OAuth provider.
- String
- The authorize url of the OAuth provider.
- client
Id String - The client id of the OAuth provider.
- client
Secret String - The client secret of the OAuth provider.
- identity
Map NumberType - The identity map type of the OAuth provider.
- idp
Identity StringKey - The idp identity key of the OAuth provider.
- oauth
Provider StringName - The name of the OAuth provider.
- sso
Type Number - The SSO type of the OAuth provider.
- token
Url String - The token url of the OAuth provider.
- user
Info StringUrl - The user info url of the OAuth provider.
- description String
- The description of the OAuth provider.
- scope String
- The scope of the OAuth provider.
- status Number
- The status of the OAuth provider.
Outputs
All input properties are implicitly available as output properties. Additionally, the OauthProvider resource produces the following output properties:
- Create
Date string - The create date of the OAuth provider.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provider
Id string - The id of the OAuth provider.
- Trn string
- The trn of the OAuth provider.
- Update
Date string - The update date of the OAuth provider.
- Create
Date string - The create date of the OAuth provider.
- Id string
- The provider-assigned unique ID for this managed resource.
- Provider
Id string - The id of the OAuth provider.
- Trn string
- The trn of the OAuth provider.
- Update
Date string - The update date of the OAuth provider.
- create
Date String - The create date of the OAuth provider.
- id String
- The provider-assigned unique ID for this managed resource.
- provider
Id String - The id of the OAuth provider.
- trn String
- The trn of the OAuth provider.
- update
Date String - The update date of the OAuth provider.
- create
Date string - The create date of the OAuth provider.
- id string
- The provider-assigned unique ID for this managed resource.
- provider
Id string - The id of the OAuth provider.
- trn string
- The trn of the OAuth provider.
- update
Date string - The update date of the OAuth provider.
- create_
date str - The create date of the OAuth provider.
- id str
- The provider-assigned unique ID for this managed resource.
- provider_
id str - The id of the OAuth provider.
- trn str
- The trn of the OAuth provider.
- update_
date str - The update date of the OAuth provider.
- create
Date String - The create date of the OAuth provider.
- id String
- The provider-assigned unique ID for this managed resource.
- provider
Id String - The id of the OAuth provider.
- trn String
- The trn of the OAuth provider.
- update
Date String - The update date of the OAuth provider.
Look up Existing OauthProvider Resource
Get an existing OauthProvider 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?: OauthProviderState, opts?: CustomResourceOptions): OauthProvider@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
authorize_template: Optional[str] = None,
authorize_url: Optional[str] = None,
client_id: Optional[str] = None,
client_secret: Optional[str] = None,
create_date: Optional[str] = None,
description: Optional[str] = None,
identity_map_type: Optional[int] = None,
idp_identity_key: Optional[str] = None,
oauth_provider_name: Optional[str] = None,
provider_id: Optional[str] = None,
scope: Optional[str] = None,
sso_type: Optional[int] = None,
status: Optional[int] = None,
token_url: Optional[str] = None,
trn: Optional[str] = None,
update_date: Optional[str] = None,
user_info_url: Optional[str] = None) -> OauthProviderfunc GetOauthProvider(ctx *Context, name string, id IDInput, state *OauthProviderState, opts ...ResourceOption) (*OauthProvider, error)public static OauthProvider Get(string name, Input<string> id, OauthProviderState? state, CustomResourceOptions? opts = null)public static OauthProvider get(String name, Output<String> id, OauthProviderState state, CustomResourceOptions options)resources: _: type: volcengine:iam:OauthProvider get: 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.
- string
- The authorize template of the OAuth provider.
- string
- The authorize url of the OAuth provider.
- Client
Id string - The client id of the OAuth provider.
- Client
Secret string - The client secret of the OAuth provider.
- Create
Date string - The create date of the OAuth provider.
- Description string
- The description of the OAuth provider.
- Identity
Map intType - The identity map type of the OAuth provider.
- Idp
Identity stringKey - The idp identity key of the OAuth provider.
- Oauth
Provider stringName - The name of the OAuth provider.
- Provider
Id string - The id of the OAuth provider.
- Scope string
- The scope of the OAuth provider.
- Sso
Type int - The SSO type of the OAuth provider.
- Status int
- The status of the OAuth provider.
- Token
Url string - The token url of the OAuth provider.
- Trn string
- The trn of the OAuth provider.
- Update
Date string - The update date of the OAuth provider.
- User
Info stringUrl - The user info url of the OAuth provider.
- string
- The authorize template of the OAuth provider.
- string
- The authorize url of the OAuth provider.
- Client
Id string - The client id of the OAuth provider.
- Client
Secret string - The client secret of the OAuth provider.
- Create
Date string - The create date of the OAuth provider.
- Description string
- The description of the OAuth provider.
- Identity
Map intType - The identity map type of the OAuth provider.
- Idp
Identity stringKey - The idp identity key of the OAuth provider.
- Oauth
Provider stringName - The name of the OAuth provider.
- Provider
Id string - The id of the OAuth provider.
- Scope string
- The scope of the OAuth provider.
- Sso
Type int - The SSO type of the OAuth provider.
- Status int
- The status of the OAuth provider.
- Token
Url string - The token url of the OAuth provider.
- Trn string
- The trn of the OAuth provider.
- Update
Date string - The update date of the OAuth provider.
- User
Info stringUrl - The user info url of the OAuth provider.
- String
- The authorize template of the OAuth provider.
- String
- The authorize url of the OAuth provider.
- client
Id String - The client id of the OAuth provider.
- client
Secret String - The client secret of the OAuth provider.
- create
Date String - The create date of the OAuth provider.
- description String
- The description of the OAuth provider.
- identity
Map IntegerType - The identity map type of the OAuth provider.
- idp
Identity StringKey - The idp identity key of the OAuth provider.
- oauth
Provider StringName - The name of the OAuth provider.
- provider
Id String - The id of the OAuth provider.
- scope String
- The scope of the OAuth provider.
- sso
Type Integer - The SSO type of the OAuth provider.
- status Integer
- The status of the OAuth provider.
- token
Url String - The token url of the OAuth provider.
- trn String
- The trn of the OAuth provider.
- update
Date String - The update date of the OAuth provider.
- user
Info StringUrl - The user info url of the OAuth provider.
- string
- The authorize template of the OAuth provider.
- string
- The authorize url of the OAuth provider.
- client
Id string - The client id of the OAuth provider.
- client
Secret string - The client secret of the OAuth provider.
- create
Date string - The create date of the OAuth provider.
- description string
- The description of the OAuth provider.
- identity
Map numberType - The identity map type of the OAuth provider.
- idp
Identity stringKey - The idp identity key of the OAuth provider.
- oauth
Provider stringName - The name of the OAuth provider.
- provider
Id string - The id of the OAuth provider.
- scope string
- The scope of the OAuth provider.
- sso
Type number - The SSO type of the OAuth provider.
- status number
- The status of the OAuth provider.
- token
Url string - The token url of the OAuth provider.
- trn string
- The trn of the OAuth provider.
- update
Date string - The update date of the OAuth provider.
- user
Info stringUrl - The user info url of the OAuth provider.
- str
- The authorize template of the OAuth provider.
- str
- The authorize url of the OAuth provider.
- client_
id str - The client id of the OAuth provider.
- client_
secret str - The client secret of the OAuth provider.
- create_
date str - The create date of the OAuth provider.
- description str
- The description of the OAuth provider.
- identity_
map_ inttype - The identity map type of the OAuth provider.
- idp_
identity_ strkey - The idp identity key of the OAuth provider.
- oauth_
provider_ strname - The name of the OAuth provider.
- provider_
id str - The id of the OAuth provider.
- scope str
- The scope of the OAuth provider.
- sso_
type int - The SSO type of the OAuth provider.
- status int
- The status of the OAuth provider.
- token_
url str - The token url of the OAuth provider.
- trn str
- The trn of the OAuth provider.
- update_
date str - The update date of the OAuth provider.
- user_
info_ strurl - The user info url of the OAuth provider.
- String
- The authorize template of the OAuth provider.
- String
- The authorize url of the OAuth provider.
- client
Id String - The client id of the OAuth provider.
- client
Secret String - The client secret of the OAuth provider.
- create
Date String - The create date of the OAuth provider.
- description String
- The description of the OAuth provider.
- identity
Map NumberType - The identity map type of the OAuth provider.
- idp
Identity StringKey - The idp identity key of the OAuth provider.
- oauth
Provider StringName - The name of the OAuth provider.
- provider
Id String - The id of the OAuth provider.
- scope String
- The scope of the OAuth provider.
- sso
Type Number - The SSO type of the OAuth provider.
- status Number
- The status of the OAuth provider.
- token
Url String - The token url of the OAuth provider.
- trn String
- The trn of the OAuth provider.
- update
Date String - The update date of the OAuth provider.
- user
Info StringUrl - The user info url of the OAuth provider.
Import
IamOAuthProvider can be imported using the id, e.g.
$ pulumi import volcengine:iam/oauthProvider:OauthProvider default oidc_provider_name
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- volcengine volcengine/pulumi-volcengine
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
volcengineTerraform Provider.
