Source Control Configuration Args
The SourceControl Configuration object returned in Get & Put response. Uses Azure REST API version 2023-05-01. In version 1.x of the Azure Native provider, it used API version 2021-03-01.
Example Usage
Create Source Control Configuration
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var sourceControlConfiguration = new AzureNative.KubernetesConfiguration.SourceControlConfiguration("sourceControlConfiguration", new()
{
ClusterName = "clusterName1",
ClusterResourceName = "connectedClusters",
ClusterRp = "Microsoft.Kubernetes",
ConfigurationProtectedSettings =
{
{ "protectedSetting1Key", "protectedSetting1Value" },
},
EnableHelmOperator = true,
HelmOperatorProperties = new AzureNative.KubernetesConfiguration.Inputs.HelmOperatorPropertiesArgs
{
ChartValues = "--set git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system",
ChartVersion = "0.3.0",
},
OperatorInstanceName = "SRSGitHubFluxOp-01",
OperatorNamespace = "SRS_Namespace",
OperatorParams = "--git-email=xyzgituser@users.srs.github.com",
OperatorScope = AzureNative.KubernetesConfiguration.OperatorScopeType.@Namespace,
OperatorType = AzureNative.KubernetesConfiguration.OperatorType.Flux,
RepositoryUrl = "git@github.com:k8sdeveloper425/flux-get-started",
ResourceGroupName = "rg1",
SourceControlConfigurationName = "SRS_GitHubConfig",
SshKnownHostsContents = "c3NoLmRldi5henVyZS5jb20gc3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDN0hyMW9UV3FOcU9sekdKT2ZHSjROYWtWeUl6ZjFyWFlkNGQ3d282akJsa0x2Q0E0b2RCbEwwbURVeVowL1FVZlRUcWV1K3RtMjJnT3N2K1ZyVlRNazZ2d1JVNzVnWS95OXV0NU1iM2JSNUJWNThkS1h5cTlBOVVlQjVDYWtlaG41WmdtNngxbUtvVnlmK0ZGbjI2aVlxWEpSZ3pJWlpjWjVWNmhyRTBRZzM5a1ptNGF6NDhvMEFVYmY2U3A0U0xkdm51TWEyc1ZOd0hCYm9TN0VKa201N1hRUFZVMy9RcHlOTEhiV0Rkend0cmxTK2V6MzBTM0FkWWhMS0VPeEFHOHdlT255cnRMSkFVZW45bVRrb2w4b0lJMWVkZjdtV1diV1ZmMG5CbWx5MjErblpjbUNUSVNRQnRkY3lQYUVubzdmRlFNREQyNi9zMGxmS29iNEt3OEg=",
});
});
package main
import (
kubernetesconfiguration "github.com/pulumi/pulumi-azure-native-sdk/kubernetesconfiguration/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := kubernetesconfiguration.NewSourceControlConfiguration(ctx, "sourceControlConfiguration", &kubernetesconfiguration.SourceControlConfigurationArgs{
ClusterName: pulumi.String("clusterName1"),
ClusterResourceName: pulumi.String("connectedClusters"),
ClusterRp: pulumi.String("Microsoft.Kubernetes"),
ConfigurationProtectedSettings: pulumi.StringMap{
"protectedSetting1Key": pulumi.String("protectedSetting1Value"),
},
EnableHelmOperator: pulumi.Bool(true),
HelmOperatorProperties: &kubernetesconfiguration.HelmOperatorPropertiesArgs{
ChartValues: pulumi.String("--set git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system"),
ChartVersion: pulumi.String("0.3.0"),
},
OperatorInstanceName: pulumi.String("SRSGitHubFluxOp-01"),
OperatorNamespace: pulumi.String("SRS_Namespace"),
OperatorParams: pulumi.String("--git-email=xyzgituser@users.srs.github.com"),
OperatorScope: pulumi.String(kubernetesconfiguration.OperatorScopeTypeNamespace),
OperatorType: pulumi.String(kubernetesconfiguration.OperatorTypeFlux),
RepositoryUrl: pulumi.String("git@github.com:k8sdeveloper425/flux-get-started"),
ResourceGroupName: pulumi.String("rg1"),
SourceControlConfigurationName: pulumi.String("SRS_GitHubConfig"),
SshKnownHostsContents: pulumi.String("c3NoLmRldi5henVyZS5jb20gc3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDN0hyMW9UV3FOcU9sekdKT2ZHSjROYWtWeUl6ZjFyWFlkNGQ3d282akJsa0x2Q0E0b2RCbEwwbURVeVowL1FVZlRUcWV1K3RtMjJnT3N2K1ZyVlRNazZ2d1JVNzVnWS95OXV0NU1iM2JSNUJWNThkS1h5cTlBOVVlQjVDYWtlaG41WmdtNngxbUtvVnlmK0ZGbjI2aVlxWEpSZ3pJWlpjWjVWNmhyRTBRZzM5a1ptNGF6NDhvMEFVYmY2U3A0U0xkdm51TWEyc1ZOd0hCYm9TN0VKa201N1hRUFZVMy9RcHlOTEhiV0Rkend0cmxTK2V6MzBTM0FkWWhMS0VPeEFHOHdlT255cnRMSkFVZW45bVRrb2w4b0lJMWVkZjdtV1diV1ZmMG5CbWx5MjErblpjbUNUSVNRQnRkY3lQYUVubzdmRlFNREQyNi9zMGxmS29iNEt3OEg="),
})
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.azurenative.kubernetesconfiguration.SourceControlConfiguration;
import com.pulumi.azurenative.kubernetesconfiguration.SourceControlConfigurationArgs;
import com.pulumi.azurenative.kubernetesconfiguration.inputs.HelmOperatorPropertiesArgs;
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 sourceControlConfiguration = new SourceControlConfiguration("sourceControlConfiguration", SourceControlConfigurationArgs.builder()
.clusterName("clusterName1")
.clusterResourceName("connectedClusters")
.clusterRp("Microsoft.Kubernetes")
.configurationProtectedSettings(Map.of("protectedSetting1Key", "protectedSetting1Value"))
.enableHelmOperator(true)
.helmOperatorProperties(HelmOperatorPropertiesArgs.builder()
.chartValues("--set git.ssh.secretName=flux-git-deploy --set tillerNamespace=kube-system")
.chartVersion("0.3.0")
.build())
.operatorInstanceName("SRSGitHubFluxOp-01")
.operatorNamespace("SRS_Namespace")
.operatorParams("--git-email=xyzgituser@users.srs.github.com")
.operatorScope("namespace")
.operatorType("Flux")
.repositoryUrl("git@github.com:k8sdeveloper425/flux-get-started")
.resourceGroupName("rg1")
.sourceControlConfigurationName("SRS_GitHubConfig")
.sshKnownHostsContents("c3NoLmRldi5henVyZS5jb20gc3NoLXJzYSBBQUFBQjNOemFDMXljMkVBQUFBREFRQUJBQUFCQVFDN0hyMW9UV3FOcU9sekdKT2ZHSjROYWtWeUl6ZjFyWFlkNGQ3d282akJsa0x2Q0E0b2RCbEwwbURVeVowL1FVZlRUcWV1K3RtMjJnT3N2K1ZyVlRNazZ2d1JVNzVnWS95OXV0NU1iM2JSNUJWNThkS1h5cTlBOVVlQjVDYWtlaG41WmdtNngxbUtvVnlmK0ZGbjI2aVlxWEpSZ3pJWlpjWjVWNmhyRTBRZzM5a1ptNGF6NDhvMEFVYmY2U3A0U0xkdm51TWEyc1ZOd0hCYm9TN0VKa201N1hRUFZVMy9RcHlOTEhiV0Rkend0cmxTK2V6MzBTM0FkWWhMS0VPeEFHOHdlT255cnRMSkFVZW45bVRrb2w4b0lJMWVkZjdtV1diV1ZmMG5CbWx5MjErblpjbUNUSVNRQnRkY3lQYUVubzdmRlFNREQyNi9zMGxmS29iNEt3OEg=")
.build());
}
}
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:kubernetesconfiguration:SourceControlConfiguration SRS_GitHubConfig /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{clusterRp}/{clusterResourceName}/{clusterName}/providers/Microsoft.KubernetesConfiguration/sourceControlConfigurations/{sourceControlConfigurationName}
Constructors
Properties
The name of the kubernetes cluster.
The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters.
Name-value pairs of protected configuration settings for the configuration
Option to enable Helm Operator for this git configuration.
Properties for Helm operator.
Instance name of the operator - identifying the specific configuration.
The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.
Any Parameters for the Operator instance in string format.
Scope at which the operator will be installed.
Type of the operator
Url of the SourceControl Repository.
The name of the resource group. The name is case insensitive.
Name of the Source Control Configuration.
Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances