Source Control Args
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());
}
}
Content copied to clipboard
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
Content copied to clipboard
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)