From 6c32d5702369a3f4cff0ef3e14789907b7cbb075 Mon Sep 17 00:00:00 2001 From: Satendra Kumar Date: Thu, 7 Aug 2025 20:30:42 +0530 Subject: [PATCH] feat:[CDS-113113]: Azure connector for terraform steps --- v0/pipeline.json | 36 ++++++++++++++++++- ...raform-azure-provider-credential-spec.yaml | 14 ++++++++ .../cd/terraform-provider-credential.yaml | 11 +++++- v0/template.json | 36 ++++++++++++++++++- 4 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 v0/pipeline/steps/cd/terraform-azure-provider-credential-spec.yaml diff --git a/v0/pipeline.json b/v0/pipeline.json index 1f93a13a2..3f052d314 100644 --- a/v0/pipeline.json +++ b/v0/pipeline.json @@ -36702,7 +36702,7 @@ "properties" : { "type" : { "type" : "string", - "enum" : [ "Aws" ] + "enum" : [ "Aws", "Azure" ] } }, "$schema" : "http://json-schema.org/draft-07/schema#", @@ -36721,6 +36721,21 @@ } } } + }, { + "if" : { + "properties" : { + "type" : { + "const" : "Azure" + } + } + }, + "then" : { + "properties" : { + "spec" : { + "$ref" : "#/definitions/pipeline/steps/cd/TerrafromAzureProviderCredentialSpec" + } + } + } } ] }, "AWSIAMRoleCredentialSpec" : { @@ -36751,6 +36766,25 @@ "discriminator" : "type", "$schema" : "http://json-schema.org/draft-07/schema#" }, + "TerrafromAzureProviderCredentialSpec" : { + "title" : "TerrafromAzureProviderCredentialSpec", + "type" : "object", + "allOf" : [ { + "$ref" : "#/definitions/pipeline/steps/cd/TerraformProviderCredentialSpec" + }, { + "type" : "object", + "required" : [ "connectorRef", "subscriptionId" ], + "properties" : { + "connectorRef" : { + "type" : "string" + }, + "subscriptionId" : { + "type" : "string" + } + } + } ], + "$schema" : "http://json-schema.org/draft-07/schema#" + }, "JenkinsBuildStepNode" : { "title" : "JenkinsBuildStepNode", "type" : "object", diff --git a/v0/pipeline/steps/cd/terraform-azure-provider-credential-spec.yaml b/v0/pipeline/steps/cd/terraform-azure-provider-credential-spec.yaml new file mode 100644 index 000000000..f9b2dff77 --- /dev/null +++ b/v0/pipeline/steps/cd/terraform-azure-provider-credential-spec.yaml @@ -0,0 +1,14 @@ +title: TerrafromAzureProviderCredentialSpec +type: object +allOf: + - $ref: 'terraform-provider-credential-spec.yaml' + - type: object + required: + - connectorRef + - subscriptionId + properties: + connectorRef: + type: string + subscriptionId: + type: string +$schema: http://json-schema.org/draft-07/schema# \ No newline at end of file diff --git a/v0/pipeline/steps/cd/terraform-provider-credential.yaml b/v0/pipeline/steps/cd/terraform-provider-credential.yaml index fbe888629..ba57fea68 100644 --- a/v0/pipeline/steps/cd/terraform-provider-credential.yaml +++ b/v0/pipeline/steps/cd/terraform-provider-credential.yaml @@ -8,6 +8,7 @@ properties: type: string enum: - Aws + - Azure $schema: http://json-schema.org/draft-07/schema# allOf: - if: @@ -17,4 +18,12 @@ allOf: then: properties: spec: - $ref: 'aws-iam-role-credential-spec.yaml' \ No newline at end of file + $ref: 'aws-iam-role-credential-spec.yaml' + - if: + properties: + type: + const: Azure + then: + properties: + spec: + $ref: 'terraform-azure-provider-credential-spec.yaml' \ No newline at end of file diff --git a/v0/template.json b/v0/template.json index 834272700..d70ea2f6b 100644 --- a/v0/template.json +++ b/v0/template.json @@ -21384,7 +21384,7 @@ "properties" : { "type" : { "type" : "string", - "enum" : [ "Aws" ] + "enum" : [ "Aws", "Azure" ] } }, "$schema" : "http://json-schema.org/draft-07/schema#", @@ -21403,6 +21403,21 @@ } } } + }, { + "if" : { + "properties" : { + "type" : { + "const" : "Azure" + } + } + }, + "then" : { + "properties" : { + "spec" : { + "$ref" : "#/definitions/pipeline/steps/cd/TerrafromAzureProviderCredentialSpec" + } + } + } } ] }, "AWSIAMRoleCredentialSpec" : { @@ -21433,6 +21448,25 @@ "discriminator" : "type", "$schema" : "http://json-schema.org/draft-07/schema#" }, + "TerrafromAzureProviderCredentialSpec" : { + "title" : "TerrafromAzureProviderCredentialSpec", + "type" : "object", + "allOf" : [ { + "$ref" : "#/definitions/pipeline/steps/cd/TerraformProviderCredentialSpec" + }, { + "type" : "object", + "required" : [ "connectorRef", "subscriptionId" ], + "properties" : { + "connectorRef" : { + "type" : "string" + }, + "subscriptionId" : { + "type" : "string" + } + } + } ], + "$schema" : "http://json-schema.org/draft-07/schema#" + }, "TerraformCloudRollbackStepNode_template" : { "title" : "TerraformCloudRollbackStepNode_template", "type" : "object",