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

Commit

Permalink
!deploy v2.12.2
Browse files Browse the repository at this point in the history
## 2.12.2 - 2020-06-04

* [Issue #79](#79)
    * Fixed: Documentation on `New-VaporCondition`
  • Loading branch information
scrthq authored Jun 4, 2020
2 parents d4f9292 + 5c24cfd commit 0a2fbdd
Show file tree
Hide file tree
Showing 8 changed files with 317 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!-- TOC -->

* [2.12.2 - 2020-06-04](#2122---2020-06-04)
* [2.12.1 - 2020-05-05](#2121---2020-05-05)
* [2.12.0 - 2020-05-03](#2120---2020-05-03)
* [2.11.1 - 2020-03-09](#2111---2020-03-09)
Expand Down Expand Up @@ -56,6 +57,11 @@

<!-- /TOC -->

## 2.12.2 - 2020-06-04

* [Issue #79](https://github.com/SCRT-HQ/VaporShell/issues/79)
* Fixed: Documentation on `New-VaporCondition`

## 2.12.1 - 2020-05-05

* Miscellaneous
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Install-Module VaporShell -Scope CurrentUser

**[Alternative]** Not on PowerShell 5+, can't install PowerShellGet, or policies blocking installation from remote sources? You're covered as well:

1. Head to the [Releases](https://github.com/scrthq/VaporShell/releases) section in the repo
1. Head to the [Releases](https://github.com/SCRT-HQ/VaporShell/releases) section in the repo
2. Download the *VaporShell.zip* file attached to the latest release.
3. **If on Windows**: Right-click the downloaded zip, select Properties, then unblock the file.
> _This is to prevent having to unblock each file individually after unzipping._
Expand Down
12 changes: 6 additions & 6 deletions VaporShell/Public/Primary Functions/New-VaporCondition.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function New-VaporCondition {
<#
.SYNOPSIS
Adds a Condition object to the template
.DESCRIPTION
The optional Conditions section includes statements that define when a resource is created or when a property is defined. For example, you can compare whether a value is equal to another value. Based on the result of that condition, you can conditionally create resources. If you have multiple conditions, separate them with commas.
Expand All @@ -28,20 +28,20 @@ function New-VaporCondition {
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/conditions-section-structure.html
.PARAMETER LogicalId
An identifier for the current condition. The logical ID must be alphanumeric (a-z, A-Z, 0-9) and unique within the template.
.PARAMETER Condition
Logical ID of the condition that this resource needs to be true in order to be provisioned.
.EXAMPLE
$template = Initialize-Vaporshell -Description "Testing Condition addition"
$template.AddResource((
$template.AddCondition((
New-VaporCondition -LogicalId "CreateProdResources" -Condition (Add-ConEquals -FirstValue (Add-FnRef -Ref "EnvType") -SecondValue "prod")
))
When the template is exported, this will convert to:
When the template is exported, this will convert to:
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Testing Condition addition",
Expand Down Expand Up @@ -101,4 +101,4 @@ function New-VaporCondition {
}
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Condition'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n`t$(@{$obj.LogicalId = $obj.Props} | ConvertTo-Json -Depth 5 -Compress)`n"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
function Add-VSEC2ClientVpnEndpointFederatedAuthenticationRequest {
<#
.SYNOPSIS
Adds an AWS::EC2::ClientVpnEndpoint.FederatedAuthenticationRequest resource property to the template.
.DESCRIPTION
Adds an AWS::EC2::ClientVpnEndpoint.FederatedAuthenticationRequest resource property to the template.
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-federatedauthenticationrequest.html
.PARAMETER SAMLProviderArn
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-clientvpnendpoint-federatedauthenticationrequest.html#cfn-ec2-clientvpnendpoint-federatedauthenticationrequest-samlproviderarn
PrimitiveType: String
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.EC2.ClientVpnEndpoint.FederatedAuthenticationRequest')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$SAMLProviderArn
)
Begin {
$obj = [PSCustomObject]@{}
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.EC2.ClientVpnEndpoint.FederatedAuthenticationRequest'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
function Add-VSKinesisFirehoseDeliveryStreamRedshiftRetryOptions {
<#
.SYNOPSIS
Adds an AWS::KinesisFirehose::DeliveryStream.RedshiftRetryOptions resource property to the template.
.DESCRIPTION
Adds an AWS::KinesisFirehose::DeliveryStream.RedshiftRetryOptions resource property to the template.
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-redshiftretryoptions.html
.PARAMETER DurationInSeconds
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-redshiftretryoptions.html#cfn-kinesisfirehose-deliverystream-redshiftretryoptions-durationinseconds
UpdateType: Mutable
PrimitiveType: Integer
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.KinesisFirehose.DeliveryStream.RedshiftRetryOptions')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.Int32","Vaporshell.Function"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$DurationInSeconds
)
Begin {
$obj = [PSCustomObject]@{}
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.KinesisFirehose.DeliveryStream.RedshiftRetryOptions'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
function Add-VSKinesisFirehoseDeliveryStreamVpcConfiguration {
<#
.SYNOPSIS
Adds an AWS::KinesisFirehose::DeliveryStream.VpcConfiguration resource property to the template.
.DESCRIPTION
Adds an AWS::KinesisFirehose::DeliveryStream.VpcConfiguration resource property to the template.
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-vpcconfiguration.html
.PARAMETER RoleARN
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-vpcconfiguration.html#cfn-kinesisfirehose-deliverystream-vpcconfiguration-rolearn
UpdateType: Immutable
PrimitiveType: String
.PARAMETER SubnetIds
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-vpcconfiguration.html#cfn-kinesisfirehose-deliverystream-vpcconfiguration-subnetids
UpdateType: Immutable
Type: List
PrimitiveItemType: String
DuplicatesAllowed: False
.PARAMETER SecurityGroupIds
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-vpcconfiguration.html#cfn-kinesisfirehose-deliverystream-vpcconfiguration-securitygroupids
UpdateType: Immutable
Type: List
PrimitiveItemType: String
DuplicatesAllowed: False
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.KinesisFirehose.DeliveryStream.VpcConfiguration')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$RoleARN,
[parameter(Mandatory = $true)]
$SubnetIds,
[parameter(Mandatory = $true)]
$SecurityGroupIds
)
Begin {
$obj = [PSCustomObject]@{}
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.KinesisFirehose.DeliveryStream.VpcConfiguration'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
function Add-VSStepFunctionsStateMachineDefinitionSubstitutions {
<#
.SYNOPSIS
Adds an AWS::StepFunctions::StateMachine.DefinitionSubstitutions resource property to the template.
.DESCRIPTION
Adds an AWS::StepFunctions::StateMachine.DefinitionSubstitutions resource property to the template.
.LINK
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.StepFunctions.StateMachine.DefinitionSubstitutions')]
[cmdletbinding()]
Param
(
)
Begin {
$obj = [PSCustomObject]@{}
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.StepFunctions.StateMachine.DefinitionSubstitutions'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
function Add-VSStepFunctionsStateMachineS3Location {
<#
.SYNOPSIS
Adds an AWS::StepFunctions::StateMachine.S3Location resource property to the template.
.DESCRIPTION
Adds an AWS::StepFunctions::StateMachine.S3Location resource property to the template.
.LINK
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-s3location.html
.PARAMETER Bucket
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-s3location.html#cfn-stepfunctions-statemachine-s3location-bucket
PrimitiveType: String
UpdateType: Mutable
.PARAMETER Version
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-s3location.html#cfn-stepfunctions-statemachine-s3location-version
PrimitiveType: String
UpdateType: Mutable
.PARAMETER Key
Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stepfunctions-statemachine-s3location.html#cfn-stepfunctions-statemachine-s3location-key
PrimitiveType: String
UpdateType: Mutable
.FUNCTIONALITY
Vaporshell
#>
[OutputType('Vaporshell.Resource.StepFunctions.StateMachine.S3Location')]
[cmdletbinding()]
Param
(
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$Bucket,
[parameter(Mandatory = $false)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$Version,
[parameter(Mandatory = $true)]
[ValidateScript( {
$allowedTypes = "System.String","Vaporshell.Function","Vaporshell.Condition"
if ([string]$($_.PSTypeNames) -match "($(($allowedTypes|ForEach-Object{[RegEx]::Escape($_)}) -join '|'))") {
$true
}
else {
$PSCmdlet.ThrowTerminatingError((New-VSError -String "This parameter only accepts the following types: $($allowedTypes -join ", "). The current types of the value are: $($_.PSTypeNames -join ", ")."))
}
})]
$Key
)
Begin {
$obj = [PSCustomObject]@{}
$commonParams = @('Verbose','Debug','ErrorAction','WarningAction','InformationAction','ErrorVariable','WarningVariable','InformationVariable','OutVariable','OutBuffer','PipelineVariable')
}
Process {
foreach ($key in $PSBoundParameters.Keys | Where-Object {$commonParams -notcontains $_}) {
switch ($key) {
Default {
$obj | Add-Member -MemberType NoteProperty -Name $key -Value $PSBoundParameters.$key
}
}
}
}
End {
$obj | Add-ObjectDetail -TypeName 'Vaporshell.Resource.StepFunctions.StateMachine.S3Location'
Write-Verbose "Resulting JSON from $($MyInvocation.MyCommand): `n`n$($obj | ConvertTo-Json -Depth 5)`n"
}
}

0 comments on commit 0a2fbdd

Please sign in to comment.