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

Can't use parameters of type List<> for AWS::RDS::DBSubnetGroup, AWS::RDS::DBCluster and AWS::Lambda::Function.VpcConfig #306

Open
xrn opened this issue Sep 22, 2020 · 1 comment

Comments

@xrn
Copy link
Contributor

xrn commented Sep 22, 2020

For rds.DBSubnetGroup.SubnetIds

rds.DBSubnetGroup{
		DBSubnetGroupDescription: "Subnet Group for Aurora Cluster",
		SubnetIds:                cloudformation.Ref("SubnetIds"),
	}

rds.DBCluster.VpcSecurityGroupIds

rds.DBCluster{
		Engine:              "aurora-mysql",
                ....
		VpcSecurityGroupIds: cloudformation.Ref("SecurityGroupIds"),
	}

and lambda.function.vpcConfig.SubnetIds, lambda.function.vpcConfig.SecurityGroupIds

lambda.Function{
                ....
		VpcConfig: lambda.Function_VpcConfig{
			SubnetIds: cloudformation.Ref("SubnetIds"),
			SecurityGroupIds: [cloudformation.Ref("SecurityGroupIds"),
		}
	}

I should be able to use cloudformation.Ref but the expected type is []string

Documentation reference - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/parameters-section-structure.html

Related to: #282

@xrn xrn changed the title Can't use parameters of type List<> for rds.DBSubnetGroup and rds.DBCluster Can't use parameters of type List<> for AWS::RDS::DBSubnetGroup, AWS::RDS::DBCluster and AWS::Lambda::Function.VpcConfig Sep 22, 2020
@xrn
Copy link
Contributor Author

xrn commented Sep 26, 2020

Example from documentation - https://d1uauaxba7bl26.cloudfront.net/latest/gzip/CloudFormationResourceSpecification.json

"AWS::RDS::DBCluster": {
      ...
      "VpcSecurityGroupIds": {
          "Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbcluster.html#cfn-rds-dbcluster-vpcsecuritygroupids",
          "DuplicatesAllowed": false,
          "PrimitiveItemType": "String",
          "Required": false,
          "Type": "List",
          "UpdateType": "Mutable"
        }

IMO @PaulMaddox we should think if everywhere where we can find PrimitiveItemType = string AND type = list we should replace []string with interface{} because we can use commadelieter parameters

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant