private void InitializeHandlers() { AwsCdkVpcHandler = new AwsCdkVpcHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkDynamoDBHandler = new AwsCdkDynamoDBHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkRoleHandler = new AwsCdkRoleHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkPolicyDocumentHandler = new AwsCdkPolicyDocumentHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkKmsHandler = new AwsCdkKmsHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkSecretHandler = new AwsCdkSecretHandler(Scope, ApplicationName, EnvironmentName, AwsCdkKmsHandler, EnvironmentProperties.Region, EnvironmentProperties.Account); AwsSecurityGroupHandler = new AwsSecurityGroupHandler(Scope, ApplicationName, EnvironmentName, AwsCdkVpcHandler, EnvironmentProperties.Region); AwsCdkDatabaseHandler = new AwsCdkDatabaseHandler(Scope, ApplicationName, EnvironmentName, AwsSecurityGroupHandler, AwsCdkVpcHandler, AwsCdkSecretHandler, EnvironmentProperties.Region); AwsCdkS3Handler = new AwsCdkS3Handler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkLambdaHandler = new AwsCdkLambdaHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkECRHandler = new AwsCdkEcrHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkEventBridgeHandler = new AwsCdkEventBridgeHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkApiGatewayHandler = new AwsCdkApiGatewayHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkCodeBuildHandler = new AwsCdkCodeBuildHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkSsmParameterStoreHandler = new AwsCdkSsmParameterStoreHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkNetworkLoadBalancerHandler = new AwsCdkNetworkLoadBalancerHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkElbHandler = new AwsCdkElbHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkAutoScalingGroupHandler = new AwsCdkAutoScalingGroupHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkEcsHandler = new AwsCdkEcsHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkPipelineHandler = new AwsCdkPipelineHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkDmsHandler = new AwsCdkDmsHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkWafHandler = new AwsCdkWafHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); AwsCdkSnsHandler = new AwsCdkSnsHandler(Scope, ApplicationName, EnvironmentName, EnvironmentProperties.Region); }
private void BasicDatabaseInfra(IVpc vpc, string secretName, string securityId, string securityGroupId, SubnetType subnetType, string defaultSubnetDomainSeparator, string subnets, out ISecurityGroup securityGroup, out ISecret secret, out ISubnetSelection subnetSelection) //NOSONAR number of params { if (vpc == null) { throw new ArgumentException("The VPC provided to create the database is not valid"); } securityGroup = AwsSecurityGroupHandler.Locate(securityId, securityGroupId); if (securityGroup == null) { throw new ArgumentException($"The Security group id {securityGroupId} provided to create the database is not valid"); } secret = AwsCdkSecretHandler.Create(secretName); subnetSelection = AwsCdkVpcHandler.GetVpcSubnetSelection(vpc, subnets, defaultSubnetDomainSeparator, subnetType); }