--- AWSTemplateFormatVersion: 2010-09-09 Description: Creates resources necessary for GraphQL RDS integration - using new VPC (qs-1tuqqm21j). Metadata: AWS::CloudFormation::Interface: ParameterGroups: - Label: default: Network configuration Parameters: - VPCCIDR - PrivateSubnet1CIDR - PrivateSubnet2CIDR - PublicSubnet1CIDR - PublicSubnet2CIDR - AvailabilityZones - Label: default: Deployment option Parameters: - RDSClusterMode - Label: default: RDS standard-mode configuration Parameters: - DBInstanceClass - Label: default: RDS serverless-mode configuration Parameters: - AutoPauseCluster - SecondsUntilAutoPause - MinCapacity - MaxCapacity - Label: default: RDS database configuration Parameters: - DatabaseUserName - DatabaseName - DatabasePort - Label: default: AppSync Parameters: - AppSyncAuthenticationType - GraphQLResolverName - GraphQLSchemaLocation - GraphQLSchemaName - RDSSchemaLocation - RDSSchemaName - MyOrderParameterName - MyOrderItemParameterName - MyProductParameterName - Label: default: AWS Partner Solution configuration Parameters: - QSS3BucketName - QSS3KeyPrefix - QSS3BucketRegion ParameterLabels: VPCCIDR: default: VPC CIDR PrivateSubnet1CIDR: default: Private subnet 1 CIDR PrivateSubnet2CIDR: default: Private subnet 2 CIDR PublicSubnet1CIDR: default: Public subnet 1 CIDR PublicSubnet2CIDR: default: Public subnet 2 CIDR AvailabilityZones: default: Availability Zones RDSClusterMode: default: RDS cluster mode DBInstanceClass: default: DB instance class AutoPauseCluster: default: Auto-pause cluster SecondsUntilAutoPause: default: Seconds until auto pause MinCapacity: default: Minimum capacity MaxCapacity: default: Maximum capacity DatabaseUserName: default: Database user name DatabaseName: default: Database name DatabasePort: default: Database port MyOrderParameterName: default: My order parameter name MyOrderItemParameterName: default: My order item parameter name MyProductParameterName: default: My product parameter name AppSyncAuthenticationType: default: AppSync authentication type GraphQLResolverName: default: GraphQL resolver name GraphQLSchemaLocation: default: GraphQL schema location GraphQLSchemaName: default: GraphQL schema name RDSSchemaLocation: default: RDS schema location RDSSchemaName: default: RDS schema name QSS3BucketName: default: Partner Solution S3 bucket name QSS3KeyPrefix: default: Partner Solution S3 key prefix QSS3BucketRegion: default: Partner Solution S3 bucket Region Parameters: RDSClusterMode: Type: String AllowedValues: - Serverless - Standard Default: Serverless Description: > Choose "Standard" to deploy a standard configuration of Amazon Aurora instead of Amazon Aurora Serverless v.1. AutoPauseCluster: Type: String AllowedValues: - 'true' - 'false' Default: 'true' Description: Choose "false" to disallow automatic pause of an idle, serverless Aurora DB cluster. With auto pause, a serverless cluster scales capacity to 0 Aurora capacity units (ACUs) when idle (no connections). SecondsUntilAutoPause: Type: Number AllowedValues: - 300 - 600 - 1200 - 3600 - 14400 - 28800 - 86400 Default: 300 Description: > Enter the time, in seconds, before an idle, serverless Aurora DB cluster scales capacity to 0 ACUs (auto-pauses). Valid entries are 300 (five minutes), 600 (10 minutes), 1200 (20 minutes), 3600 (one hour), 14400 (four hours), 28800 (eight hours), and 86400 (24 hours). MinCapacity: Type: Number AllowedValues: - 2 - 4 - 8 - 16 - 32 - 64 - 192 - 384 Default: 2 Description: > Enter the minimum capacity for a serverless Aurora DB cluster. MaxCapacity: Type: Number AllowedValues: - 2 - 4 - 8 - 16 - 32 - 64 - 192 - 384 Default: 16 Description: > Enter the maximum capacity for a serverless Aurora DB cluster. Must be greater than or equal to minimum capacity. PrivateSubnet1CIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. Default: 10.0.0.0/19 Description: CIDR block for private subnet 1, located in Availability Zone 1. Type: String PrivateSubnet2CIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. Default: 10.0.32.0/19 Description: CIDR block for private subnet 2, located in Availability Zone 2. Type: String PublicSubnet1CIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. Default: 10.0.128.0/20 Description: CIDR block for public subnet 1, located in Availability Zone 1. Type: String PublicSubnet2CIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28 Default: 10.0.144.0/20 Description: CIDR block for public subnet 2, located in Availability Zone 2. Type: String VPCCIDR: AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ ConstraintDescription: CIDR block parameter must be in the form x.x.x.x/16-28. Default: 10.0.0.0/16 Description: CIDR block for the VPC. Type: String AvailabilityZones: Description: Choose two Availability Zones to use for this deployment. Type: List QSS3BucketName: AllowedPattern: ^[0-9a-z]+([0-9a-z-\.]*[0-9a-z])*$ ConstraintDescription: >- The S3 bucket name can include numbers, lowercase letters, and hyphens (-), but it cannot start or end with a hyphen. Default: aws-quickstart Description: >- Name of the S3 bucket for your copy of the deployment assets. Keep the default name unless you are customizing the template. Changing the name updates code references to point to a new location. MinLength: 3 MaxLength: 63 Type: String QSS3BucketRegion: Default: us-east-1 Description: >- AWS Region where the S3 bucket (QSS3BucketName) is hosted. Keep the default Region unless you are customizing the template. Changing the Region updates code references to point to a new location. When using your own bucket, specify the Region. Type: String QSS3KeyPrefix: AllowedPattern: ^([0-9a-zA-Z!-_\.\*'\(\)/]+/)*$ ConstraintDescription: >- The S3 key prefix can include numbers, lowercase letters, uppercase letters, hyphens (-), underscores (_), periods (.), asterisks (*), single quotes ('), open parenthesis ((), close parenthesis ()), and forward slashes (/). End the prefix with a forward slash. Default: quickstart-salesforce-connect-appsync-rds-postgresql/ Description: >- S3 key prefix that is used to simulate a folder for your copy of the deployment assets. Keep the default prefix unless you are customizing the template. Changing the prefix updates code references to point to a new location. Type: String DBInstanceClass: Description: RDS instance class. Type: String Default: db.t3.medium AllowedValues: - db.r5.large - db.r5.xlarge - db.r5.2xlarge - db.r5.4xlarge - db.r5.8xlarge - db.t3.medium - db.t3.large DatabaseUserName: Description: Database user name. Type: String Default: dbadmin DatabaseName: Description: Database name. Type: String Default: graphqlrds DatabasePort: Type: String Default: 5432 MyOrderParameterName: Description: My order parameter name. Type: String Default: "/appsync/typemetadata/Graphqlsample_MyOrder" MyOrderItemParameterName: Description: My order item parameter name. Type: String Default: "/appsync/typemetadata/Graphqlsample_MyOrderItem" MyProductParameterName: Description: My product parameter name. Type: String Default: "/appsync/typemetadata/Graphqlsample_MyProduct" AppSyncAuthenticationType: Description: Choose "AWS_IAM" to authenticate interactions with AWS AppSync using AWS IAM permissions instead of API keys. Type: String Default: API_KEY AllowedValues: - AWS_IAM - API_KEY GraphQLResolverName: Description: Resolver name. Type: String Default: graphql.resolvers.sql-1.0.0.jar GraphQLSchemaLocation: Description: Enter the location of GraphQL schema. Type: String GraphQLSchemaName: Description: GraphQL schema name. Type: String RDSSchemaLocation: Description: Enter the location of RDS schema. Type: String RDSSchemaName: Description: RDS schema name. Type: String Conditions: UsingDefaultBucket: !Equals [!Ref QSS3BucketName, 'aws-quickstart'] Resources: VPCStack: Type: 'AWS::CloudFormation::Stack' Properties: TemplateURL: !Sub - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}submodules/quickstart-aws-vpc/templates/aws-vpc.template.yaml - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: AvailabilityZones: !Join - ',' - !Ref AvailabilityZones NumberOfAZs: '2' PrivateSubnet1ACIDR: !Ref PrivateSubnet1CIDR PrivateSubnet2ACIDR: !Ref PrivateSubnet2CIDR PublicSubnet1CIDR: !Ref PublicSubnet1CIDR PublicSubnet2CIDR: !Ref PublicSubnet2CIDR VPCCIDR: !Ref VPCCIDR ExistingVPCStack: Type: 'AWS::CloudFormation::Stack' Properties: TemplateURL: !Sub - https://${S3Bucket}.s3.${S3Region}.${AWS::URLSuffix}/${QSS3KeyPrefix}templates/salesforce-connect-appsync-rds-postgresql-existing-vpc.template.yaml - S3Region: !If [UsingDefaultBucket, !Ref 'AWS::Region', !Ref QSS3BucketRegion] S3Bucket: !If [UsingDefaultBucket, !Sub '${QSS3BucketName}-${AWS::Region}', !Ref QSS3BucketName] Parameters: AvailabilityZones: !Join - ',' - !Ref AvailabilityZones VPCID: !GetAtt VPCStack.Outputs.VPCID PrivateSubnet1ID: !GetAtt VPCStack.Outputs.PrivateSubnet1AID PrivateSubnet2ID: !GetAtt VPCStack.Outputs.PrivateSubnet2AID RDSClusterMode: !Ref RDSClusterMode AutoPauseCluster: !Ref AutoPauseCluster SecondsUntilAutoPause: !Ref SecondsUntilAutoPause MinCapacity: !Ref MinCapacity MaxCapacity: !Ref MaxCapacity DBInstanceClass: !Ref DBInstanceClass AppSyncAuthenticationType: !Ref AppSyncAuthenticationType GraphQLResolverName: !Ref GraphQLResolverName GraphQLSchemaLocation: !Ref GraphQLSchemaLocation GraphQLSchemaName: !Ref GraphQLSchemaName RDSSchemaLocation: !Ref RDSSchemaLocation RDSSchemaName: !Ref RDSSchemaName QSS3KeyPrefix: !Ref QSS3KeyPrefix QSS3BucketName: !Ref QSS3BucketName QSS3BucketRegion: !Ref QSS3BucketRegion DatabaseName: !Ref DatabaseName DatabasePort: !Ref DatabasePort DatabaseUserName: !Ref DatabaseUserName MyOrderParameterName: !Ref MyOrderParameterName MyOrderItemParameterName: !Ref MyOrderItemParameterName MyProductParameterName: !Ref MyProductParameterName