diff --git a/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/artifacts/policyStorageTags.json b/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/artifacts/policyStorageTags.json new file mode 100644 index 00000000000..e137ff002dd --- /dev/null +++ b/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/artifacts/policyStorageTags.json @@ -0,0 +1,17 @@ +{ + "kind": "policyAssignment", + "properties": { + "displayName": "Apply storage tag to resource group", + "description": "Apply storage tag and the parameter also used by the template to resource groups", + "dependsOn": [], + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/49c88fc8-6fd1-46fd-a676-f12d1d3a4c71", + "parameters": { + "tagName": { + "value": "StorageType" + }, + "tagValue": { + "value": "[parameters('storageAccountType')]" + } + } + } +} \ No newline at end of file diff --git a/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/artifacts/policyTags.json b/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/artifacts/policyTags.json new file mode 100644 index 00000000000..73f48e912ea --- /dev/null +++ b/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/artifacts/policyTags.json @@ -0,0 +1,17 @@ +{ + "kind": "policyAssignment", + "properties": { + "displayName": "Apply tag and its default value to resource groups", + "description": "Apply tag and its default value to resource groups", + "dependsOn": [], + "policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/49c88fc8-6fd1-46fd-a676-f12d1d3a4c71", + "parameters": { + "tagName": { + "value": "[parameters('tagName')]" + }, + "tagValue": { + "value": "[parameters('tagValue')]" + } + } + } +} \ No newline at end of file diff --git a/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/artifacts/roleContributor.json b/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/artifacts/roleContributor.json new file mode 100644 index 00000000000..f48e4689792 --- /dev/null +++ b/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/artifacts/roleContributor.json @@ -0,0 +1,8 @@ +{ + "kind": "roleAssignment", + "properties": { + "dependsOn": [], + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "principalIds": "[parameters('contributors')]" + } +} \ No newline at end of file diff --git a/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/artifacts/roleOwner.json b/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/artifacts/roleOwner.json new file mode 100644 index 00000000000..cd957caf908 --- /dev/null +++ b/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/artifacts/roleOwner.json @@ -0,0 +1,9 @@ +{ + "kind": "roleAssignment", + "properties": { + "dependsOn": [], + "roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635", + "principalIds": "[parameters('owners')]", + "resourceGroup": "storageRG" + } +} \ No newline at end of file diff --git a/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/blueprint.json b/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/blueprint.json new file mode 100644 index 00000000000..5a248ee864d --- /dev/null +++ b/src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/exported/test-imported-bp000002/blueprint.json @@ -0,0 +1,58 @@ +{ + "properties": { + "description": "This blueprint sets tag policy and role assignment on the subscription, creates a ResourceGroup, and deploys a resource template and role assignment to that ResourceGroup.", + "targetScope": "subscription", + "parameters": { + "storageAccountType": { + "type": "string", + "defaultValue": "Standard_LRS", + "allowedValues": [ + "Standard_LRS", + "Standard_GRS", + "Standard_ZRS", + "Premium_LRS" + ], + "metadata": { + "displayName": "storage account type.", + "description": "storage account type." + } + }, + "tagName": { + "type": "string", + "metadata": { + "displayName": "The name of the tag to provide the policy assignment.", + "description": "The name of the tag to provide the policy assignment." + } + }, + "tagValue": { + "type": "string", + "metadata": { + "displayName": "The value of the tag to provide the policy assignment.", + "description": "The value of the tag to provide the policy assignment." + } + }, + "contributors": { + "type": "array", + "metadata": { + "description": "List of AAD object IDs that is assigned Contributor role at the subscription", + "strongType": "PrincipalId" + } + }, + "owners": { + "type": "array", + "metadata": { + "description": "List of AAD object IDs that is assigned Owner role at the resource group", + "strongType": "PrincipalId" + } + } + }, + "resourceGroups": { + "storageRG": { + "dependsOn": [], + "metadata": { + "description": "Contains the resource template deployment and a role assignment." + } + } + } + } +} \ No newline at end of file