forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Blueprint] Close Azure#2723: add export feature for blueprint and ar…
…tifacts (Azure#3259) * added test and input files * style checks * changed param name to match import params, added example * fix linter issues * removed unnecessary AE variable * update history and setup with latest version and release note * change minor version * removed --force flag and replaced with skip_confirmation. updated params other files * Update src/blueprint/setup.py Co-authored-by: Feng Zhou <[email protected]> Co-authored-by: Feng Zhou <[email protected]>
- Loading branch information
1 parent
a980ca1
commit 372b3f2
Showing
13 changed files
with
879 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...blueprint/tests/latest/input/export_with_artifacts/input/artifacts/policyStorageTags.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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')]" | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
.../azext_blueprint/tests/latest/input/export_with_artifacts/input/artifacts/policyTags.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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')]" | ||
} | ||
} | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...t_blueprint/tests/latest/input/export_with_artifacts/input/artifacts/roleContributor.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"kind": "roleAssignment", | ||
"properties": { | ||
"dependsOn": [], | ||
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", | ||
"principalIds": "[parameters('contributors')]" | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...t/azext_blueprint/tests/latest/input/export_with_artifacts/input/artifacts/roleOwner.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"kind": "roleAssignment", | ||
"properties": { | ||
"dependsOn": [], | ||
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/8e3af657-a8ff-443c-a75c-2fe8c4bcb635", | ||
"principalIds": "[parameters('owners')]", | ||
"resourceGroup": "storageRG" | ||
} | ||
} |
58 changes: 58 additions & 0 deletions
58
src/blueprint/azext_blueprint/tests/latest/input/export_with_artifacts/input/blueprint.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
"metadata": { | ||
"displayName": "storage account type.", | ||
"description": "storage account type." | ||
}, | ||
"defaultValue": "Standard_LRS", | ||
"allowedValues": [ | ||
"Standard_LRS", | ||
"Standard_GRS", | ||
"Standard_ZRS", | ||
"Premium_LRS" | ||
] | ||
}, | ||
"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": { | ||
"metadata": { | ||
"description": "Contains the resource template deployment and a role assignment." | ||
}, | ||
"dependsOn": [] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.