source_control_configurations
Creates, updates, deletes, gets or lists a source_control_configurations resource.
Overview
| Name | source_control_configurations |
| Type | Resource |
| Id | azure.kubernetes_configuration.source_control_configurations |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
complianceStatus | object | Compliance Status of the Configuration. |
configurationProtectedSettings | object | Name-value pairs of protected configuration settings for the configuration. |
enableHelmOperator | boolean | Option to enable Helm Operator for this git configuration. |
helmOperatorProperties | object | Properties for Helm operator. |
operatorInstanceName | string | Instance name of the operator - identifying the specific configuration. |
operatorNamespace | string | The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only. |
operatorParams | string | Any Parameters for the Operator instance in string format. |
operatorScope | string | Scope at which the operator will be installed. Known values are: "cluster" and "namespace". |
operatorType | string | Type of the operator. "Flux" |
provisioningState | string | The provisioning state of the resource provider. Known values are: "Accepted", "Deleting", "Running", "Succeeded", and "Failed". |
repositoryPublicKey | string | Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user). |
repositoryUrl | string | Url of the SourceControl Repository. |
sshKnownHostsContents | string | Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances. |
systemData | object | Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
complianceStatus | object | Compliance Status of the Configuration. |
configurationProtectedSettings | object | Name-value pairs of protected configuration settings for the configuration. |
enableHelmOperator | boolean | Option to enable Helm Operator for this git configuration. |
helmOperatorProperties | object | Properties for Helm operator. |
operatorInstanceName | string | Instance name of the operator - identifying the specific configuration. |
operatorNamespace | string | The namespace to which this operator is installed to. Maximum of 253 lower case alphanumeric characters, hyphen and period only. |
operatorParams | string | Any Parameters for the Operator instance in string format. |
operatorScope | string | Scope at which the operator will be installed. Known values are: "cluster" and "namespace". |
operatorType | string | Type of the operator. "Flux" |
provisioningState | string | The provisioning state of the resource provider. Known values are: "Accepted", "Deleting", "Running", "Succeeded", and "Failed". |
repositoryPublicKey | string | Public Key associated with this SourceControl configuration (either generated within the cluster or provided by the user). |
repositoryUrl | string | Url of the SourceControl Repository. |
sshKnownHostsContents | string | Base64-encoded known_hosts contents containing public SSH keys required to access private Git instances. |
systemData | object | Top level metadata https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-contracts.md#system-metadata-for-all-azure-resources. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
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.
| Name | Datatype | Description |
|---|---|---|
cluster_name | string | The name of the kubernetes cluster. Required. |
cluster_resource_name | string | The Kubernetes cluster resource name - i.e. managedClusters, connectedClusters, provisionedClusters. Required. |
cluster_rp | string | The Kubernetes cluster RP - i.e. Microsoft.ContainerService, Microsoft.Kubernetes, Microsoft.HybridContainerService. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
source_control_configuration_name | string | Name of the Source Control Configuration. Required. |
subscription_id | string |
SELECT examples
- get
- list
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
;
List all Source Control Configurations.
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 subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: source_control_configurations
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the source_control_configurations resource.
- name: cluster_rp
value: "{{ cluster_rp }}"
description: Required parameter for the source_control_configurations resource.
- name: cluster_resource_name
value: "{{ cluster_resource_name }}"
description: Required parameter for the source_control_configurations resource.
- name: cluster_name
value: "{{ cluster_name }}"
description: Required parameter for the source_control_configurations resource.
- name: source_control_configuration_name
value: "{{ source_control_configuration_name }}"
description: Required parameter for the source_control_configurations resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the source_control_configurations resource.
- name: properties
value:
repositoryUrl: "{{ repositoryUrl }}"
operatorNamespace: "{{ operatorNamespace }}"
operatorInstanceName: "{{ operatorInstanceName }}"
operatorType: "{{ operatorType }}"
operatorParams: "{{ operatorParams }}"
configurationProtectedSettings: "{{ configurationProtectedSettings }}"
operatorScope: "{{ operatorScope }}"
sshKnownHostsContents: "{{ sshKnownHostsContents }}"
enableHelmOperator: {{ enableHelmOperator }}
helmOperatorProperties:
chartVersion: "{{ chartVersion }}"
chartValues: "{{ chartValues }}"
REPLACE examples
- create_or_update
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
- delete
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
;