Skip to content

New-MGNReplicationConfigurationTemplate - ReplicationServersSecurityGroupsIDs is marked as required #368

@DenisBellezi

Description

@DenisBellezi

Describe the bug

ERROR MESSAGE:
WARNING: You are passing $null as a value for parameter ReplicationServersSecurityGroupsIDs which is marked as required. In case you believe this parameter was incorrectly marked as required, report this by opening an issue at https://github.com/aws/aws-tools-for-powershell/issues.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

ReplicationServersSecurityGroupsIDs should not be required

Current Behavior

ReplicationServersSecurityGroupsIDs is required which is a different behavior from that we have in AWS CLI.

Reproduction Steps

#---------------------------------------------
PARAMETERS USED FOR CREATION:

$replicationConfig = @{
StagingAreaSubnetId = "subnet-041798402f8942d5a"
StagingAreaTags = @{ "" = "" }
UseDedicatedReplicationServer = $false
BandwidthThrottling = 0
EbsEncryption = "DEFAULT" # Options: DEFAULT, CUSTOM, NONE
DataPlaneRouting = "PUBLIC_IP" # Options: PRIVATE_IP, PUBLIC_IP
DefaultLargeStagingDiskType = "GP3" # Options: GP2, GP3, ST1
AssociateDefaultSecurityGroup = $true
CreatePublicIP = $true
ReplicationServerInstanceType = "t3.small"
ReplicationServersSecurityGroupsIDs = $null
}

New-MGNReplicationConfigurationTemplate @replicationConfig
#---------------------------------------------
The command above works if I add a security group in ReplicationServersSecurityGroupsIDs

#---------------------------------------------

AWS CLI

In AWS CLI is possible to create a an MGN Replication Template without specifying a --replication-servers-security-groups-ids

Example:

aws mgn create-replication-configuration-template --associate-default-security-group --default-large-staging-disk-type GP3 --replication-server-instance-type t3.small --staging-area-subnet-id subnet-041798402f8942d5a --create-public-ip --data-plane-routing PUBLIC_IP --bandwidth-throttling 0 --ebs-encryption DEFAULT --no-use-dedicated-replication-server --replication-servers-security-groups-ids [""] --staging-area-tags = --region ap-southeast-2

Possible Solution

Make ReplicationServersSecurityGroupsIDs optional.

Additional Information/Context

No response

AWS Tools for PowerShell version used

Binary 4.1.724 AWS.Tools.Common
Binary 4.1.724 AWS.Tools.Mgn

$PSVersionTable.PSVersion

PowerShell version used

Major Minor Patch PreReleaseLabel BuildLabel


7 4 6

Operating System and version

Microsoft Windows Server 2022 Datacenter

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions