Skip to content

Commit bdc7ae8

Browse files
author
Sheyla Trudo
committed
fixup! Move to Resource Module
1 parent 76f10cb commit bdc7ae8

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

.pipelines/templates/artifact-storage.steps.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ steps:
149149
resourceType: roledefinition
150150
serviceConnection: $(ACN_TEST_SERVICE_CONNECTION)
151151
inputs:
152-
roleDefinitionName: $(ACNCI_BUILDUSER_ROLEDEFINITION_NAME)
152+
roleName: $(ACNCI_BUILDUSER_ROLE_NAME)
153153
roleDefinitionFileLocation: ./azure-container-networking/.pipelines/templates/mi-build-role.json
154-
subscriptionId: $(build.subscriptionId)
154+
subscriptionId: $(build.ACNCI_BUILD_SUBSCRIPTION_ID)
155155
buildTagDefinitionIdKey: $(ACNCI_BUILDTAG_DEFINITIONID)
156156
buildTagCreatedByAppIdKey: $(ACNCI_BUILDTAG_CREATEDBYAPPID)
157157

@@ -168,11 +168,11 @@ steps:
168168
and(succeeded(),
169169
gt(variables.OUT_RESULT_LENGTH, 0))
170170
inputs:
171-
roleDefinitionName: $(ACNCI_BUILDUSER_ROLEDEFINITION_NAME)
171+
roleName: $(ACNCI_BUILDUSER_ROLE_NAME)
172172
roleDefinitionJson: $(OUT_RESULT)
173173
roleDefinitionFileLocation: ./azure-container-networking/.pipelines/templates/mi-build-role.json
174174
resourceGroupId: $(resourcegroups.ACNCI_BUILD_RESOURCEGROUP)
175-
subscriptionId: $(build.subscriptionId)
175+
subscriptionId: $(build.ACNCI_BUILD_SUBSCRIPTION_ID)
176176
buildTagDefinitionIdKey: $(ACNCI_BUILDTAG_DEFINITIONID)
177177
buildTagCreatedByAppIdKey: $(ACNCI_BUILDTAG_CREATEDBYAPPID)
178178
buildTagCreatedByBuildIdKey: $(ACNCI_BUILDTAG_CREATEDBYAPPID)
@@ -185,7 +185,7 @@ steps:
185185
resourceType: roleassignments
186186
serviceConnection: $(ACN_TEST_SERVICE_CONNECTION)
187187
inputs:
188-
roleName: $(ACNCI_BUILDUSER_ROLEDEFINITION_NAME)
188+
roleName: $(ACNCI_BUILDUSER_ROLE_NAME)
189189
managedIdentityObjectId: $(build.ACNCI_BUILD_SP_APP_OID)
190190
resourceGroupName: $(resourcegroups.ACNCI_BUILD_RESOURCEGROUP)
191191
buildTagDefinitionIdKey: $(ACNCI_BUILDTAG_DEFINITIONID)
@@ -202,7 +202,7 @@ steps:
202202
lt(variables.OUT_RESULT_LENGTH, 1)))
203203
updateCondition: False
204204
inputs:
205-
roleName: $(ACNCI_BUILDUSER_ROLEDEFINITION_NAME)
205+
roleName: $(ACNCI_BUILDUSER_ROLE_NAME)
206206
managedIdentityObjectId: $(build.ACNCI_BUILD_SP_APP_OID)
207207
resourceGroupId: $(resourcegroups.ACNCI_BUILD_RESOURCEGROUP_ID)
208208
resourceGroupName: $(resourcegroups.ACNCI_BUILD_RESOURCEGROUP)

.pipelines/templates/create-or-update-resource.steps.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ steps:
4343
BUILDTAG_CREATEDBYAPPID: '${{ parameters.inputs.buildTagCreatedByAppIdKey }}'
4444
BUILDTAG_CREATEDBYBUILDID: '${{ parameters.inputs.buildTagCreatedByBuildIdKey }}'
4545
${{ if eq(parameters.resourceType, 'roleassignments') }}:
46-
ROLEDEFINITION_NAME: '${{ parameters.inputs.roleDefinitionName }}'
46+
ROLE_NAME: '${{ parameters.inputs.roleName }}'
4747
RESOURCEGROUP_ID: '${{ parameters.inputs.resourceGroupId }}'
4848
MANAGEDIDENTITY_OBJECTID: '${{ parameters.inputs.managedIdentityObjectId }}'
4949

@@ -76,7 +76,7 @@ steps:
7676
[[ -n $SYSTEM_DEBUG ]] && [[ $SYSTEM_DEBUG =~ $IS_TRUE ]] && set -x || set +x
7777
7878
az role assignment create \
79-
--role "$ROLEDEFINITION_NAME" \
79+
--role "$ROLE_NAME" \
8080
--assignee-object-id "$MANAGEDIDENTITY_OBJECTID" \
8181
--assignee-principal-type ServicePrincipal \
8282
--scope "$RESOURCEGROUP_ID"
@@ -147,7 +147,7 @@ steps:
147147
resourceGroupName: '${{ parameters.inputs.resourceGroupName }}'
148148

149149
${{ elseif eq(parameters.resourceType, 'roledefinition') }}:
150-
roleDefinitionName: '${{ parameters.inputs.roleDefinitionName }}'
150+
roleName: '${{ parameters.inputs.roleName }}'
151151
roleDefinitionFileLocation: '${{ parameters.inputs.roleDefinitionFileLocation }}'
152152
subscriptionId: '${{ parameters.inputs.subscriptionId }}'
153153

.pipelines/templates/get-resources.steps.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ steps:
3030
BUILDTAG_CREATEDBYAPPID: '${{ parameters.inputs.buildTagCreatedByAppIdKey }}'
3131
${{ if eq(parameters.resourceType, 'roledefinition') }}:
3232
SUBSCRIPTION_ID: '${{ parameters.inputs.subscriptionId }}'
33-
ROLEDEFINITION_NAME: '${{ parameters.inputs.roleDefinitionName }}'
33+
ROLE_NAME: '${{ parameters.inputs.roleName }}'
3434
ROLEDEFINITION_FILEPATH: '${{ parameters.inputs.roleDefinitionFileLocation }}'
3535

3636
${{ elseif eq(parameters.resourceType, 'roleassignments') }}:
3737
MANAGEDIDENTITY_OBJECTID: '${{ parameters.inputs.managedIdentityObjectId }}'
38-
RESOUCEGROUP_NAME: '${{ parameters.inputs.resourceGroupName }}'
38+
RESOURCEGROUP_NAME: '${{ parameters.inputs.resourceGroupName }}'
3939
ROLE_NAME: '${{ parameters.inputs.roleName }}'
4040

4141
${{ elseif eq(parameters.resourceType, 'resourcegroups') }}:
4242
# Allows use of az devops commands
4343
AZURE_DEVOPS_EXT_PAT: $(System.AccessToken)
4444

4545
${{ elseif eq(parameters.resourceType, 'storageaccounts') }}:
46-
RESOUCEGROUP_NAME: '${{ parameters.inputs.resourceGroupName }}'
46+
RESOURCEGROUP_NAME: '${{ parameters.inputs.resourceGroupName }}'
4747

4848
${{ elseif eq(parameters.resourceType, 'managedidentity') }}:
49-
RESOUCEGROUP_NAME: '${{ parameters.inputs.resourceGroupName }}'
49+
RESOURCEGROUP_NAME: '${{ parameters.inputs.resourceGroupName }}'
5050

5151
inputs:
5252
azureSubscription: ${{ parameters.serviceConnection }}
@@ -60,7 +60,7 @@ steps:
6060
[[ -n $SYSTEM_DEBUG ]] && [[ $SYSTEM_DEBUG =~ $IS_TRUE ]] && set -x || set +x
6161
6262
DEF_LIST=$(az role definition list \
63-
--name "$ROLEDEFINITION_NAME" \
63+
--name "$ROLE_NAME" \
6464
--custom-role-only \
6565
-ojson | jq -rc '.')
6666
DEF=$(echo "$DEF_LIST" | jq -rc .[0])
@@ -141,7 +141,7 @@ steps:
141141
142142
R_QUERY="[? tags.\""$BUILDTAG_DEFINITIONID"\" && tags.\""$BUILDTAG_CREATEDBYAPPID"\"]"
143143
MI_LIST=$(az identity list \
144-
--resource-group "$RESOUCEGROUP_NAME" \
144+
--resource-group "$RESOURCEGROUP_NAME" \
145145
--query "$R_QUERY" -o json | \
146146
jq -rc \
147147
--arg BUILDTAG_CREATEDBYAPPID "$BUILDTAG_CREATEDBYAPPID" \

0 commit comments

Comments
 (0)