We recommend using Azure Native.
azure.appservice.SourceCodeToken
Explore with Pulumi AI
Manages an App Service source control token.
!> NOTE: This resource has been deprecated in version 5.0 of the provider and will be removed in version 6.0. Please use azure.appservice.ServicePlan
resource instead.
NOTE: Source Control Tokens are configured at the subscription level, not on each App Service - as such this can only be configured Subscription-wide
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.appservice.SourceCodeToken("example", {
type: "GitHub",
token: "7e57735e77e577e57",
});
import pulumi
import pulumi_azure as azure
example = azure.appservice.SourceCodeToken("example",
type="GitHub",
token="7e57735e77e577e57")
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appservice"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := appservice.NewSourceCodeToken(ctx, "example", &appservice.SourceCodeTokenArgs{
Type: pulumi.String("GitHub"),
Token: pulumi.String("7e57735e77e577e57"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.AppService.SourceCodeToken("example", new()
{
Type = "GitHub",
Token = "7e57735e77e577e57",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.appservice.SourceCodeToken;
import com.pulumi.azure.appservice.SourceCodeTokenArgs;
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 SourceCodeToken("example", SourceCodeTokenArgs.builder()
.type("GitHub")
.token("7e57735e77e577e57")
.build());
}
}
resources:
example:
type: azure:appservice:SourceCodeToken
properties:
type: GitHub
token: 7e57735e77e577e57
Create SourceCodeToken Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SourceCodeToken(name: string, args: SourceCodeTokenArgs, opts?: CustomResourceOptions);
@overload
def SourceCodeToken(resource_name: str,
args: SourceCodeTokenArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SourceCodeToken(resource_name: str,
opts: Optional[ResourceOptions] = None,
token: Optional[str] = None,
type: Optional[str] = None,
token_secret: Optional[str] = None)
func NewSourceCodeToken(ctx *Context, name string, args SourceCodeTokenArgs, opts ...ResourceOption) (*SourceCodeToken, error)
public SourceCodeToken(string name, SourceCodeTokenArgs args, CustomResourceOptions? opts = null)
public SourceCodeToken(String name, SourceCodeTokenArgs args)
public SourceCodeToken(String name, SourceCodeTokenArgs args, CustomResourceOptions options)
type: azure:appservice:SourceCodeToken
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 SourceCodeTokenArgs
- 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 SourceCodeTokenArgs
- 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 SourceCodeTokenArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SourceCodeTokenArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SourceCodeTokenArgs
- 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 sourceCodeTokenResource = new Azure.AppService.SourceCodeToken("sourceCodeTokenResource", new()
{
Token = "string",
Type = "string",
TokenSecret = "string",
});
example, err := appservice.NewSourceCodeToken(ctx, "sourceCodeTokenResource", &appservice.SourceCodeTokenArgs{
Token: pulumi.String("string"),
Type: pulumi.String("string"),
TokenSecret: pulumi.String("string"),
})
var sourceCodeTokenResource = new SourceCodeToken("sourceCodeTokenResource", SourceCodeTokenArgs.builder()
.token("string")
.type("string")
.tokenSecret("string")
.build());
source_code_token_resource = azure.appservice.SourceCodeToken("sourceCodeTokenResource",
token="string",
type="string",
token_secret="string")
const sourceCodeTokenResource = new azure.appservice.SourceCodeToken("sourceCodeTokenResource", {
token: "string",
type: "string",
tokenSecret: "string",
});
type: azure:appservice:SourceCodeToken
properties:
token: string
tokenSecret: string
type: string
SourceCodeToken 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 SourceCodeToken resource accepts the following input properties:
- Token string
- The OAuth access token.
- Type string
- The source control type. Possible values are
BitBucket
,Dropbox
,GitHub
andOneDrive
. - Token
Secret string - The OAuth access token secret.
- Token string
- The OAuth access token.
- Type string
- The source control type. Possible values are
BitBucket
,Dropbox
,GitHub
andOneDrive
. - Token
Secret string - The OAuth access token secret.
- token String
- The OAuth access token.
- type String
- The source control type. Possible values are
BitBucket
,Dropbox
,GitHub
andOneDrive
. - token
Secret String - The OAuth access token secret.
- token string
- The OAuth access token.
- type string
- The source control type. Possible values are
BitBucket
,Dropbox
,GitHub
andOneDrive
. - token
Secret string - The OAuth access token secret.
- token str
- The OAuth access token.
- type str
- The source control type. Possible values are
BitBucket
,Dropbox
,GitHub
andOneDrive
. - token_
secret str - The OAuth access token secret.
- token String
- The OAuth access token.
- type String
- The source control type. Possible values are
BitBucket
,Dropbox
,GitHub
andOneDrive
. - token
Secret String - The OAuth access token secret.
Outputs
All input properties are implicitly available as output properties. Additionally, the SourceCodeToken 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 SourceCodeToken Resource
Get an existing SourceCodeToken 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?: SourceCodeTokenState, opts?: CustomResourceOptions): SourceCodeToken
@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) -> SourceCodeToken
func GetSourceCodeToken(ctx *Context, name string, id IDInput, state *SourceCodeTokenState, opts ...ResourceOption) (*SourceCodeToken, error)
public static SourceCodeToken Get(string name, Input<string> id, SourceCodeTokenState? state, CustomResourceOptions? opts = null)
public static SourceCodeToken get(String name, Output<String> id, SourceCodeTokenState 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 OAuth access token.
- Token
Secret string - The OAuth access token secret.
- Type string
- The source control type. Possible values are
BitBucket
,Dropbox
,GitHub
andOneDrive
.
- Token string
- The OAuth access token.
- Token
Secret string - The OAuth access token secret.
- Type string
- The source control type. Possible values are
BitBucket
,Dropbox
,GitHub
andOneDrive
.
- token String
- The OAuth access token.
- token
Secret String - The OAuth access token secret.
- type String
- The source control type. Possible values are
BitBucket
,Dropbox
,GitHub
andOneDrive
.
- token string
- The OAuth access token.
- token
Secret string - The OAuth access token secret.
- type string
- The source control type. Possible values are
BitBucket
,Dropbox
,GitHub
andOneDrive
.
- token str
- The OAuth access token.
- token_
secret str - The OAuth access token secret.
- type str
- The source control type. Possible values are
BitBucket
,Dropbox
,GitHub
andOneDrive
.
- token String
- The OAuth access token.
- token
Secret String - The OAuth access token secret.
- type String
- The source control type. Possible values are
BitBucket
,Dropbox
,GitHub
andOneDrive
.
Import
App Service Source Control Token’s can be imported using the type
, e.g.
$ pulumi import azure:appservice/sourceCodeToken:SourceCodeToken example {type}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.