Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.11.0 published on Monday, Jun 27, 2022 by Pulumi

SourceControlToken

Import

App Service Source GitHub Tokens can be imported using the resource id, e.g.

 $ pulumi import azure:appservice/sourceControlToken:SourceControlToken example /providers/Microsoft.Web/sourceControls/GitHub

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Azure.AppService.SourceControlToken("example", new Azure.AppService.SourceControlTokenArgs
        {
            Token = "ghp_sometokenvaluesecretsauce",
            Type = "GitHub",
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appservice"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := appservice.NewSourceControlToken(ctx, "example", &appservice.SourceControlTokenArgs{
			Token: pulumi.String("ghp_sometokenvaluesecretsauce"),
			Type:  pulumi.String("GitHub"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new SourceControlToken("example", SourceControlTokenArgs.builder()        
            .token("ghp_sometokenvaluesecretsauce")
            .type("GitHub")
            .build());

    }
}
import pulumi
import pulumi_azure as azure

example = azure.appservice.SourceControlToken("example",
    token="ghp_sometokenvaluesecretsauce",
    type="GitHub")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.appservice.SourceControlToken("example", {
    token: "ghp_sometokenvaluesecretsauce",
    type: "GitHub",
});
resources:
  example:
    type: azure:appservice:SourceControlToken
    properties:
      token: ghp_sometokenvaluesecretsauce
      type: GitHub

Create a SourceControlToken Resource

new SourceControlToken(name: string, args: SourceControlTokenArgs, opts?: CustomResourceOptions);
@overload
def SourceControlToken(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       token: Optional[str] = None,
                       token_secret: Optional[str] = None,
                       type: Optional[str] = None)
@overload
def SourceControlToken(resource_name: str,
                       args: SourceControlTokenArgs,
                       opts: Optional[ResourceOptions] = None)
func NewSourceControlToken(ctx *Context, name string, args SourceControlTokenArgs, opts ...ResourceOption) (*SourceControlToken, error)
public SourceControlToken(string name, SourceControlTokenArgs args, CustomResourceOptions? opts = null)
public SourceControlToken(String name, SourceControlTokenArgs args)
public SourceControlToken(String name, SourceControlTokenArgs args, CustomResourceOptions options)
type: azure:appservice:SourceControlToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

Token string

The Access Token.

Type string

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

TokenSecret string
Token string

The Access Token.

Type string

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

TokenSecret string
token String

The Access Token.

type String

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

tokenSecret String
token string

The Access Token.

type string

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

tokenSecret string
token str

The Access Token.

type str

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

token_secret str
token String

The Access Token.

type String

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

tokenSecret String

Outputs

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

Get an existing SourceControlToken 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?: SourceControlTokenState, opts?: CustomResourceOptions): SourceControlToken
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        token: Optional[str] = None,
        token_secret: Optional[str] = None,
        type: Optional[str] = None) -> SourceControlToken
func GetSourceControlToken(ctx *Context, name string, id IDInput, state *SourceControlTokenState, opts ...ResourceOption) (*SourceControlToken, error)
public static SourceControlToken Get(string name, Input<string> id, SourceControlTokenState? state, CustomResourceOptions? opts = null)
public static SourceControlToken get(String name, Output<String> id, SourceControlTokenState 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:
Token string

The Access Token.

TokenSecret string
Type string

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

Token string

The Access Token.

TokenSecret string
Type string

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

token String

The Access Token.

tokenSecret String
type String

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

token string

The Access Token.

tokenSecret string
type string

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

token str

The Access Token.

token_secret str
type str

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

token String

The Access Token.

tokenSecret String
type String

The Token type. Possible values include Bitbucket, Dropbox, Github, and OneDrive.

Package Details

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

This Pulumi package is based on the azurerm Terraform Provider.