azure.appservice.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 System.Collections.Generic;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.AppService.SourceControlToken("example", new()
{
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 com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.appservice.SourceControlToken;
import com.pulumi.azure.appservice.SourceControlTokenArgs;
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 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 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
, andOneDrive
.- Token
Secret string The Access Token Secret.
- Token string
The Access Token.
- Type string
The Token type. Possible values include
Bitbucket
,Dropbox
,Github
, andOneDrive
.- Token
Secret string The Access Token Secret.
- token String
The Access Token.
- type String
The Token type. Possible values include
Bitbucket
,Dropbox
,Github
, andOneDrive
.- token
Secret String The Access Token Secret.
- token string
The Access Token.
- type string
The Token type. Possible values include
Bitbucket
,Dropbox
,Github
, andOneDrive
.- token
Secret string The Access Token Secret.
- token str
The Access Token.
- type str
The Token type. Possible values include
Bitbucket
,Dropbox
,Github
, andOneDrive
.- token_
secret str The Access Token Secret.
- token String
The Access Token.
- type String
The Token type. Possible values include
Bitbucket
,Dropbox
,Github
, andOneDrive
.- token
Secret String The Access Token Secret.
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 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.
- Token string
The Access Token.
- Token
Secret string The Access Token Secret.
- Type string
The Token type. Possible values include
Bitbucket
,Dropbox
,Github
, andOneDrive
.
- Token string
The Access Token.
- Token
Secret string The Access Token Secret.
- Type string
The Token type. Possible values include
Bitbucket
,Dropbox
,Github
, andOneDrive
.
- token String
The Access Token.
- token
Secret String The Access Token Secret.
- type String
The Token type. Possible values include
Bitbucket
,Dropbox
,Github
, andOneDrive
.
- token string
The Access Token.
- token
Secret string The Access Token Secret.
- type string
The Token type. Possible values include
Bitbucket
,Dropbox
,Github
, andOneDrive
.
- token str
The Access Token.
- token_
secret str The Access Token Secret.
- type str
The Token type. Possible values include
Bitbucket
,Dropbox
,Github
, andOneDrive
.
- token String
The Access Token.
- token
Secret String The Access Token Secret.
- type String
The Token type. Possible values include
Bitbucket
,Dropbox
,Github
, andOneDrive
.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
azurerm
Terraform Provider.