From 095a439ff3d19ff741efb25c9772f24f9d91539d Mon Sep 17 00:00:00 2001 From: Victor Silva Date: Thu, 27 Sep 2018 10:15:16 -0300 Subject: [PATCH 1/3] add new snippet: new Azure Resource Group --- docs/community_snippets.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/community_snippets.md b/docs/community_snippets.md index 6bb1f8eb00..758addfef9 100644 --- a/docs/community_snippets.md +++ b/docs/community_snippets.md @@ -32,6 +32,7 @@ _To contribute, check out our [guide here](#contributing)._ | [PSCustomObject](#pscustomobject) | _A simple PSCustomObject by @brettmillerb_ | | [Region Block](#region-block) | _Region Block for organizing and folding of your code_ | | [Send-MailMessage](#send-mailmessage) | _Send an mail message with the most common parameters by @fullenw1_ | +| [New Azure Resource Group](#new-azure-resource-group) | _Create an Azure Resource group by @vmsilvamolina_ | ## Snippets @@ -344,6 +345,23 @@ Add the Send-MailMessage cmdlet with the most common parameters in a hashtable f } ``` +### New Azure Resource Group + +Create a Resource Group on Azure, by @vmsilvamolina. + +#### Snippet + +```json +"New Azure Resource Group": { + "prefix": "rg", + "body": [ + "#New Resource Group", + "New-AzureRmResourceGroup -ResourceGroupName \"${1:ResourceGroup}\" -Location \"${2:EastUS}\"" + ], + "description": "Create an Azure Resource Group" +} +``` + ## Contributing If you'd like to add a snippet to this list, [open a pull request](https://opensource.guide/how-to-contribute/#opening-a-pull-request) with the following changes: From d4cd1fe268c9ca12109fe064c500807a608be4cf Mon Sep 17 00:00:00 2001 From: Victor Silva Date: Fri, 28 Sep 2018 08:07:09 -0300 Subject: [PATCH 2/3] fix the name of the snippet --- docs/community_snippets.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/community_snippets.md b/docs/community_snippets.md index 758addfef9..188dad0bd4 100644 --- a/docs/community_snippets.md +++ b/docs/community_snippets.md @@ -353,7 +353,7 @@ Create a Resource Group on Azure, by @vmsilvamolina. ```json "New Azure Resource Group": { - "prefix": "rg", + "prefix": "ex-New-AzureRmResourceGroup", "body": [ "#New Resource Group", "New-AzureRmResourceGroup -ResourceGroupName \"${1:ResourceGroup}\" -Location \"${2:EastUS}\"" From 2871c9ca8e6e83d9de0679418f4fd37a06d5ebcd Mon Sep 17 00:00:00 2001 From: Victor Silva Date: Fri, 28 Sep 2018 17:29:37 -0300 Subject: [PATCH 3/3] fix the order list! --- docs/community_snippets.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/community_snippets.md b/docs/community_snippets.md index 188dad0bd4..ea0622d15a 100644 --- a/docs/community_snippets.md +++ b/docs/community_snippets.md @@ -26,13 +26,13 @@ _To contribute, check out our [guide here](#contributing)._ | [Error-Terminating](#error-terminating) | _Create a full terminating error by @omniomi_ | | [IfShouldProcess](#ifshouldprocess) | _Added If Should Process_ | | [MaxColumnLengthinDataTable](#maxcolumnlengthindatatable) | _Gets the max length of string columns in datatables_ | +| [New Azure Resource Group](#new-azure-resource-group) | _Create an Azure Resource group by @vmsilvamolina_ | | [Parameter-Credential](#parameter-credential) | _Add a standard credential parameter to your function by @omniomi_ | | [PesterTestForMandatoryParameter](#pestertestformandatoryparameter) | _Create Pester test for a mandatory parameter_ | | [PesterTestForParameter](#pestertestforparameter) | _Create Pester test for parameter_ | | [PSCustomObject](#pscustomobject) | _A simple PSCustomObject by @brettmillerb_ | | [Region Block](#region-block) | _Region Block for organizing and folding of your code_ | | [Send-MailMessage](#send-mailmessage) | _Send an mail message with the most common parameters by @fullenw1_ | -| [New Azure Resource Group](#new-azure-resource-group) | _Create an Azure Resource group by @vmsilvamolina_ | ## Snippets @@ -220,6 +220,23 @@ Takes a datatable object and iterates through it to get the max length of the st } ``` +### New Azure Resource Group + +Create a Resource Group on Azure, by @vmsilvamolina. + +#### Snippet + +```json +"New Azure Resource Group": { + "prefix": "ex-New-AzureRmResourceGroup", + "body": [ + "#New Resource Group", + "New-AzureRmResourceGroup -ResourceGroupName \"${1:ResourceGroup}\" -Location \"${2:EastUS}\"" + ], + "description": "Create an Azure Resource Group" +} +``` + ### Parameter-Credential Add a `-Credential` parameter that supports a PSCredential object in a variable, `-Credential (Get-Credential)`, or `-Credential Username` (will prompt). Includes an empty PSCredential object as the default value but this is the first tabstop so pressing backspace after inserting the snippet removes it. by @omniomi @@ -345,23 +362,6 @@ Add the Send-MailMessage cmdlet with the most common parameters in a hashtable f } ``` -### New Azure Resource Group - -Create a Resource Group on Azure, by @vmsilvamolina. - -#### Snippet - -```json -"New Azure Resource Group": { - "prefix": "ex-New-AzureRmResourceGroup", - "body": [ - "#New Resource Group", - "New-AzureRmResourceGroup -ResourceGroupName \"${1:ResourceGroup}\" -Location \"${2:EastUS}\"" - ], - "description": "Create an Azure Resource Group" -} -``` - ## Contributing If you'd like to add a snippet to this list, [open a pull request](https://opensource.guide/how-to-contribute/#opening-a-pull-request) with the following changes: