Skip to main content

source_control_configurations

Creates, updates, deletes, gets or lists a source_control_configurations resource.

Overview

Namesource_control_configurations
TypeResource
Idazure.kubernetes_configuration.source_control_configurations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
complianceStatusobjectCompliance Status of the Configuration.
configurationProtectedSettingsobjectName-value pairs of protected configuration settings for the configuration.
enableHelmOperatorbooleanOption to enable Helm Operator for this git configuration.
helmOperatorPropertiesobjectProperties for Helm operator.
operatorInstanceNamestringInstance name of the operator - identifying the specific configuration.
operatorNamespacestringThe namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only.
operatorParamsstringAny Parameters for the Operator instance in string format.
operatorScopestringScope at which the operator will be installed. Known values are: "cluster" and "namespace".
operatorTypestringType of the operator. "Flux"
provisioningStatestringThe provisioning state of the resource provider. Known values are: "Accepted", "Deleting", "Running", "Succeeded", and "Failed".
repositoryPublicKeystringPublic Key associated with this SourceControl configuration (either generated within the cluster or provided by the user).
repositoryUrlstringUrl of the SourceControl Repository.
sshKnownHostsContentsstringBase64-encoded known_hosts contents containing public SSH keys required to access private Git instances.
systemDataobjectTop level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, cluster_rp, cluster_resource_name, cluster_name, source_control_configuration_name, subscription_idGets details of the Source Control Configuration.
listselectresource_group_name, cluster_rp, cluster_resource_name, cluster_name, subscription_idList all Source Control Configurations.
create_or_updateinsertresource_group_name, cluster_rp, cluster_resource_name, cluster_name, source_control_configuration_name, subscription_idCreate a new Kubernetes Source Control Configuration.
create_or_updatereplaceresource_group_name, cluster_rp, cluster_resource_name, cluster_name, source_control_configuration_name, subscription_idCreate a new Kubernetes Source Control Configuration.
deletedeleteresource_group_name, cluster_rp, cluster_resource_name, cluster_name, source_control_configuration_name, subscription_idThis will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
cluster_namestringThe name of the kubernetes cluster. Required.
cluster_resource_namestringThe Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. Required.
cluster_rpstringThe Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
source_control_configuration_namestringName of the Source Control Configuration. Required.
subscription_idstring

SELECT examples

Gets details of the Source Control Configuration.

SELECT
id,
name,
complianceStatus,
configurationProtectedSettings,
enableHelmOperator,
helmOperatorProperties,
operatorInstanceName,
operatorNamespace,
operatorParams,
operatorScope,
operatorType,
provisioningState,
repositoryPublicKey,
repositoryUrl,
sshKnownHostsContents,
systemData,
type
FROM azure.kubernetes_configuration.source_control_configurations
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND cluster_rp = '{{ cluster_rp }}' -- required
AND cluster_resource_name = '{{ cluster_resource_name }}' -- required
AND cluster_name = '{{ cluster_name }}' -- required
AND source_control_configuration_name = '{{ source_control_configuration_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Create a new Kubernetes Source Control Configuration.

INSERT INTO azure.kubernetes_configuration.source_control_configurations (
properties,
resource_group_name,
cluster_rp,
cluster_resource_name,
cluster_name,
source_control_configuration_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ cluster_rp }}',
'{{ cluster_resource_name }}',
'{{ cluster_name }}',
'{{ source_control_configuration_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;

REPLACE examples

Create a new Kubernetes Source Control Configuration.

REPLACE azure.kubernetes_configuration.source_control_configurations
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND cluster_rp = '{{ cluster_rp }}' --required
AND cluster_resource_name = '{{ cluster_resource_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND source_control_configuration_name = '{{ source_control_configuration_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

This will delete the YAML file used to set up the Source control configuration, thus stopping future sync from the source repo.

DELETE FROM azure.kubernetes_configuration.source_control_configurations
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND cluster_rp = '{{ cluster_rp }}' --required
AND cluster_resource_name = '{{ cluster_resource_name }}' --required
AND cluster_name = '{{ cluster_name }}' --required
AND source_control_configuration_name = '{{ source_control_configuration_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;