Skip to content
This repository was archived by the owner on Oct 21, 2023. It is now read-only.

Commit 8ca62c6

Browse files
authored
!deploy v2.12.0
## 2.12.0 - 2020-05-03 * [Issue #74](#74) * Fixed: `UpdateReplacePolicy` was incorrectly nested under the Resource Properties, not top-level next to `DeletionPolicy`. * [Issue #75](#75) * Added: Support for `ResourcesToImport` declaration on changes sets with `New-VSChangeSet` * Added: New helper function `Add-VSChangeSetResourceToImport` to create the `ResourceToImport` object needed as the value of the `ResourcesToImport` parameter on `New-VSChangeSet`
2 parents 3e20e98 + 5b6800b commit 8ca62c6

File tree

623 files changed

+21438
-69
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

623 files changed

+21438
-69
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<!-- TOC -->
44

5+
* [2.12.0 - 2020-05-03](#2120---2020-05-03)
56
* [2.11.1 - 2020-03-09](#2111---2020-03-09)
67
* [2.11.0 - 2020-03-04](#2110---2020-03-04)
78
* [2.10.1 - 2020-02-20](#2101---2020-02-20)
@@ -56,6 +57,14 @@
5657

5758
<!-- /TOC -->
5859

60+
## 2.12.0 - 2020-05-03
61+
62+
* [Issue #74](https://github.com/SCRT-HQ/VaporShell/issues/74)
63+
* Fixed: `UpdateReplacePolicy` was incorrectly nested under the Resource Properties, not top-level next to `DeletionPolicy`.
64+
* [Issue #75](https://github.com/SCRT-HQ/VaporShell/issues/75)
65+
* Added: Support for `ResourcesToImport` declaration on changes sets with `New-VSChangeSet`
66+
* Added: New helper function `Add-VSChangeSetResourceToImport` to create the `ResourceToImport` object needed as the value of the `ResourcesToImport` parameter on `New-VSChangeSet`
67+
5968
## 2.11.1 - 2020-03-09
6069

6170
* [Issue #72](https://github.com/SCRT-HQ/VaporShell/issues/72)

VaporShell/Public/Primary Functions/New-VaporResource.ps1

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ function New-VaporResource {
22
<#
33
.SYNOPSIS
44
Adds a Resource object to the template
5-
5+
66
.DESCRIPTION
77
The required Resources section declares the AWS resources that you want to include in the stack, such as an Amazon EC2 instance or an Amazon S3 bucket. You must declare each resource separately; however, if you have multiple resources of the same type, you can declare them together by separating them with commas.
88
99
.LINK
1010
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html
11-
11+
1212
.PARAMETER LogicalId
1313
The logical ID must be alphanumeric (A-Za-z0-9) and unique within the template. Use the logical name to reference the resource in other parts of the template. For example, if you want to map an Amazon Elastic Block Store volume to an Amazon EC2 instance, you reference the logical IDs to associate the block stores with the instance.
1414
1515
In addition to the logical ID, certain resources also have a physical ID, which is the actual assigned name for that resource, such as an EC2 instance ID or an S3 bucket name. Use the physical IDs to identify resources outside of AWS CloudFormation templates, but only after the resources have been created. For example, you might give an EC2 instance resource a logical ID of MyEC2Instance; but when AWS CloudFormation creates the instance, AWS CloudFormation automatically generates and assigns a physical ID (such as i-28f9ba55) to the instance. You can use this physical ID to identify the instance and view its properties (such as the DNS name) by using the Amazon EC2 console. For resources that support custom names, you can assign your own names (physical IDs) to help you quickly identify resources. For example, you can name an S3 bucket that stores logs as MyPerformanceLogs.
16-
16+
1717
.PARAMETER Type
1818
The resource type identifies the type of resource that you are declaring. For example, AWS::EC2::Instance declares an EC2 instance. For a list of all of the resource types, see AWS Resource Types Reference.
19-
19+
2020
.PARAMETER Properties
2121
This is a collection of Resource properties are additional options that you can specify for a resource. For example, for each EC2 instance, you must specify an Amazon Machine Image (AMI) ID for that instance.
2222
@@ -48,7 +48,7 @@ function New-VaporResource {
4848
Use the UpdatePolicy attribute to specify how AWS CloudFormation handles updates to the AWS::AutoScaling::AutoScalingGroup resource. AWS CloudFormation invokes one of three update policies depending on the type of change you make or whether a scheduled action is associated with the Auto Scaling group.
4949
5050
You must use the "Add-UpdatePolicy" function here.
51-
51+
5252
.PARAMETER Condition
5353
Logical ID of the condition that this resource needs to be true in order for this resource to be provisioned.
5454
@@ -62,7 +62,7 @@ function New-VaporResource {
6262
}
6363
))
6464
65-
When the template is exported, this will convert to:
65+
When the template is exported, this will convert to:
6666
```json
6767
{
6868
"AWSTemplateFormatVersion": "2010-09-09",
@@ -77,7 +77,7 @@ function New-VaporResource {
7777
"",
7878
[
7979
"Queue=",
80-
{
80+
{
8181
"Ref": "MyQueue"
8282
}
8383
]
@@ -86,8 +86,8 @@ function New-VaporResource {
8686
},
8787
"AvailabilityZone": "us-east-1a",
8888
"ImageId": "ami-20b65349"
89-
}
90-
}
89+
}
90+
}
9191
}
9292
}
9393
```
@@ -139,6 +139,10 @@ function New-VaporResource {
139139
[ValidateSet("Delete","Retain","Snapshot")]
140140
[System.String]
141141
$DeletionPolicy,
142+
[parameter(Mandatory = $false)]
143+
[ValidateSet("Delete","Retain","Snapshot")]
144+
[System.String]
145+
$UpdateReplacePolicy,
142146
[parameter(Mandatory = $false,Position = 5)]
143147
[System.String[]]
144148
$DependsOn,
@@ -185,6 +189,9 @@ function New-VaporResource {
185189
if ($DeletionPolicy) {
186190
$obj.Props | Add-Member -MemberType NoteProperty -Name "DeletionPolicy" -Value $DeletionPolicy
187191
}
192+
if ($UpdateReplacePolicy) {
193+
$obj.Props | Add-Member -MemberType NoteProperty -Name "UpdateReplacePolicy" -Value $UpdateReplacePolicy
194+
}
188195
if ($DependsOn) {
189196
$obj.Props | Add-Member -MemberType NoteProperty -Name "DependsOn" -Value $DependsOn
190197
}
@@ -197,4 +204,4 @@ function New-VaporResource {
197204
$obj | Add-Member -MemberType ScriptMethod -Name ToString -Value {$this.LogicalId} -Force
198205
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource'
199206
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5)`n"
200-
}
207+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
function Add-VSApiGatewayV2IntegrationTlsConfig {
2+
<#
3+
.SYNOPSIS
4+
Adds an AWS::ApiGatewayV2::Integration.TlsConfig resource property to the template.
5+
6+
.DESCRIPTION
7+
Adds an AWS::ApiGatewayV2::Integration.TlsConfig resource property to the template.
8+
9+
10+
.LINK
11+
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-integration-tlsconfig.html
12+
13+
.PARAMETER ServerNameToVerify
14+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-integration-tlsconfig.html#cfn-apigatewayv2-integration-tlsconfig-servernametoverify
15+
PrimitiveType: String
16+
UpdateType: Mutable
17+
18+
.FUNCTIONALITY
19+
Vaporshell
20+
#>
21+
[OutputType('Vaporshell.Resource.ApiGatewayV2.Integration.TlsConfig')]
22+
[cmdletbinding()]
23+
Param
24+
(
25+
[parameter(Mandatory = $false)]
26+
[ValidateScript( {
27+
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
28+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
29+
$true
30+
}
31+
else {
32+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
33+
}
34+
})]
35+
$ServerNameToVerify
36+
)
37+
Begin {
38+
$obj = [PSCustomObject]@{}
39+
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
40+
}
41+
Process {
42+
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
43+
switch ($key) {
44+
Default {
45+
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
46+
}
47+
}
48+
}
49+
}
50+
End {
51+
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.ApiGatewayV2.Integration.TlsConfig'
52+
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
53+
}
54+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
function Add-VSAthenaWorkGroupEncryptionConfiguration {
2+
<#
3+
.SYNOPSIS
4+
Adds an AWS::Athena::WorkGroup.EncryptionConfiguration resource property to the template.
5+
6+
.DESCRIPTION
7+
Adds an AWS::Athena::WorkGroup.EncryptionConfiguration resource property to the template.
8+
9+
10+
.LINK
11+
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-encryptionconfiguration.html
12+
13+
.PARAMETER EncryptionOption
14+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-encryptionconfiguration.html#cfn-athena-workgroup-encryptionconfiguration-encryptionoption
15+
UpdateType: Mutable
16+
PrimitiveType: String
17+
18+
.PARAMETER KmsKey
19+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-encryptionconfiguration.html#cfn-athena-workgroup-encryptionconfiguration-kmskey
20+
UpdateType: Mutable
21+
PrimitiveType: String
22+
23+
.FUNCTIONALITY
24+
Vaporshell
25+
#>
26+
[OutputType('Vaporshell.Resource.Athena.WorkGroup.EncryptionConfiguration')]
27+
[cmdletbinding()]
28+
Param
29+
(
30+
[parameter(Mandatory = $true)]
31+
[ValidateScript( {
32+
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
33+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
34+
$true
35+
}
36+
else {
37+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
38+
}
39+
})]
40+
$EncryptionOption,
41+
[parameter(Mandatory = $false)]
42+
[ValidateScript( {
43+
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
44+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
45+
$true
46+
}
47+
else {
48+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
49+
}
50+
})]
51+
$KmsKey
52+
)
53+
Begin {
54+
$obj = [PSCustomObject]@{}
55+
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
56+
}
57+
Process {
58+
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
59+
switch ($key) {
60+
Default {
61+
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
62+
}
63+
}
64+
}
65+
}
66+
End {
67+
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Athena.WorkGroup.EncryptionConfiguration'
68+
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
69+
}
70+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
function Add-VSAthenaWorkGroupResultConfiguration {
2+
<#
3+
.SYNOPSIS
4+
Adds an AWS::Athena::WorkGroup.ResultConfiguration resource property to the template.
5+
6+
.DESCRIPTION
7+
Adds an AWS::Athena::WorkGroup.ResultConfiguration resource property to the template.
8+
9+
10+
.LINK
11+
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfiguration.html
12+
13+
.PARAMETER EncryptionConfiguration
14+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfiguration.html#cfn-athena-workgroup-resultconfiguration-encryptionconfiguration
15+
UpdateType: Mutable
16+
Type: EncryptionConfiguration
17+
18+
.PARAMETER OutputLocation
19+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfiguration.html#cfn-athena-workgroup-resultconfiguration-outputlocation
20+
UpdateType: Mutable
21+
PrimitiveType: String
22+
23+
.FUNCTIONALITY
24+
Vaporshell
25+
#>
26+
[OutputType('Vaporshell.Resource.Athena.WorkGroup.ResultConfiguration')]
27+
[cmdletbinding()]
28+
Param
29+
(
30+
[parameter(Mandatory = $false)]
31+
$EncryptionConfiguration,
32+
[parameter(Mandatory = $false)]
33+
[ValidateScript( {
34+
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
35+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
36+
$true
37+
}
38+
else {
39+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
40+
}
41+
})]
42+
$OutputLocation
43+
)
44+
Begin {
45+
$obj = [PSCustomObject]@{}
46+
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
47+
}
48+
Process {
49+
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
50+
switch ($key) {
51+
Default {
52+
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
53+
}
54+
}
55+
}
56+
}
57+
End {
58+
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Athena.WorkGroup.ResultConfiguration'
59+
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
60+
}
61+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
function Add-VSAthenaWorkGroupResultConfigurationUpdates {
2+
<#
3+
.SYNOPSIS
4+
Adds an AWS::Athena::WorkGroup.ResultConfigurationUpdates resource property to the template.
5+
6+
.DESCRIPTION
7+
Adds an AWS::Athena::WorkGroup.ResultConfigurationUpdates resource property to the template.
8+
9+
10+
.LINK
11+
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfigurationupdates.html
12+
13+
.PARAMETER EncryptionConfiguration
14+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfigurationupdates.html#cfn-athena-workgroup-resultconfigurationupdates-encryptionconfiguration
15+
UpdateType: Mutable
16+
Type: EncryptionConfiguration
17+
18+
.PARAMETER OutputLocation
19+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfigurationupdates.html#cfn-athena-workgroup-resultconfigurationupdates-outputlocation
20+
UpdateType: Mutable
21+
PrimitiveType: String
22+
23+
.PARAMETER RemoveEncryptionConfiguration
24+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfigurationupdates.html#cfn-athena-workgroup-resultconfigurationupdates-removeencryptionconfiguration
25+
UpdateType: Mutable
26+
PrimitiveType: Boolean
27+
28+
.PARAMETER RemoveOutputLocation
29+
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-resultconfigurationupdates.html#cfn-athena-workgroup-resultconfigurationupdates-removeoutputlocation
30+
UpdateType: Mutable
31+
PrimitiveType: Boolean
32+
33+
.FUNCTIONALITY
34+
Vaporshell
35+
#>
36+
[OutputType('Vaporshell.Resource.Athena.WorkGroup.ResultConfigurationUpdates')]
37+
[cmdletbinding()]
38+
Param
39+
(
40+
[parameter(Mandatory = $false)]
41+
$EncryptionConfiguration,
42+
[parameter(Mandatory = $false)]
43+
[ValidateScript( {
44+
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
45+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
46+
$true
47+
}
48+
else {
49+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
50+
}
51+
})]
52+
$OutputLocation,
53+
[parameter(Mandatory = $false)]
54+
[ValidateScript( {
55+
$allowedTypes = "System.Boolean","Vaporshell.Function"
56+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
57+
$true
58+
}
59+
else {
60+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
61+
}
62+
})]
63+
$RemoveEncryptionConfiguration,
64+
[parameter(Mandatory = $false)]
65+
[ValidateScript( {
66+
$allowedTypes = "System.Boolean","Vaporshell.Function"
67+
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
68+
$true
69+
}
70+
else {
71+
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
72+
}
73+
})]
74+
$RemoveOutputLocation
75+
)
76+
Begin {
77+
$obj = [PSCustomObject]@{}
78+
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
79+
}
80+
Process {
81+
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
82+
switch ($key) {
83+
Default {
84+
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
85+
}
86+
}
87+
}
88+
}
89+
End {
90+
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.Athena.WorkGroup.ResultConfigurationUpdates'
91+
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
92+
}
93+
}

0 commit comments

Comments
 (0)