SourceControlArgs

data class SourceControlArgs(val automaticSync: Output<Boolean>? = null, val automationAccountId: Output<String>? = null, val branch: Output<String>? = null, val description: Output<String>? = null, val folderPath: Output<String>? = null, val name: Output<String>? = null, val publishRunbookEnabled: Output<Boolean>? = null, val repositoryUrl: Output<String>? = null, val security: Output<SourceControlSecurityArgs>? = null, val sourceControlType: Output<String>? = null) : ConvertibleToJava<SourceControlArgs>

Manages an Automation Source Control.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.automation.Account;
import com.pulumi.azure.automation.AccountArgs;
import com.pulumi.azure.automation.SourceControl;
import com.pulumi.azure.automation.SourceControlArgs;
import com.pulumi.azure.automation.inputs.SourceControlSecurityArgs;
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 ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("example-account")
.location(example.location())
.resourceGroupName(example.name())
.skuName("Basic")
.build());
var exampleSourceControl = new SourceControl("exampleSourceControl", SourceControlArgs.builder()
.name("example")
.automationAccountId(exampleAccount.id())
.folderPath("runbook")
.security(SourceControlSecurityArgs.builder()
.token("ghp_xxx")
.tokenType("PersonalAccessToken")
.build())
.repositoryUrl("https://github.com/foo/bat.git")
.sourceControlType("GitHub")
.branch("main")
.build());
}
}

Import

Automations can be imported using the resource id, e.g.

$ pulumi import azure:automation/sourceControl:SourceControl example /subscriptions/12345678-1234-9876-4563-123456789012/resourceGroups/group1/providers/Microsoft.Automation/automationAccounts/account1/sourceControls/sc1

Constructors

Link copied to clipboard
fun SourceControlArgs(automaticSync: Output<Boolean>? = null, automationAccountId: Output<String>? = null, branch: Output<String>? = null, description: Output<String>? = null, folderPath: Output<String>? = null, name: Output<String>? = null, publishRunbookEnabled: Output<Boolean>? = null, repositoryUrl: Output<String>? = null, security: Output<SourceControlSecurityArgs>? = null, sourceControlType: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): SourceControlArgs

Properties

Link copied to clipboard
val automaticSync: Output<Boolean>? = null

Whether auto async the Source Control.

Link copied to clipboard
val automationAccountId: Output<String>? = null

The ID of Automation Account to manage this Source Control. Changing this forces a new Automation Source Control to be created.

Link copied to clipboard
val branch: Output<String>? = null

Specify the repo branch of the Source Control. Empty value is valid only for VsoTfvc.

Link copied to clipboard
val description: Output<String>? = null

A short description of the Source Control.

Link copied to clipboard
val folderPath: Output<String>? = null

The folder path of the source control. This Path must be relative.

Link copied to clipboard
val name: Output<String>? = null

The name which should be used for this Automation Source Control. Changing this forces a new Automation Source Control to be created.

Link copied to clipboard
val publishRunbookEnabled: Output<Boolean>? = null

Whether auto publish the Source Control. Defaults to true.

Link copied to clipboard
val repositoryUrl: Output<String>? = null

The Repository URL of the source control.

Link copied to clipboard
val security: Output<SourceControlSecurityArgs>? = null

A security block as defined below.

Link copied to clipboard
val sourceControlType: Output<String>? = null

The source type of Source Control, possible vaules are VsoGit, VsoTfvc and GitHub, and the value is case sensitive.