AWS::AppRunner::VpcConnector
The AWS::AppRunner::VpcConnector resource is an Amazon App Runner resource type that specifies an App Runner VPC connector.
App Runner requires this resource when you want to associate your App Runner service to a custom Amazon Virtual Private Cloud (Amazon VPC).
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::AppRunner::VpcConnector", "Properties" : { "SecurityGroups" :[ String, ... ], "Subnets" :[ String, ... ], "Tags" :[ Tag, ... ], "VpcConnectorName" :String} }
YAML
Type: AWS::AppRunner::VpcConnector Properties: SecurityGroups:- StringSubnets:- StringTags:- TagVpcConnectorName:String
Properties
SecurityGroups-
A list of IDs of security groups that App Runner should use for access to Amazon resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
Required: No
Type: List of String
Update requires: Replacement
Subnets-
A list of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
Note
App Runner currently only provides support for IPv4.
Required: Yes
Type: List of String
Update requires: Replacement
Tags-
A list of metadata items that you can associate with your VPC connector resource. A tag is a key-value pair.
Required: No
Type: List of Tag
Update requires: Replacement
VpcConnectorName-
A name for the VPC connector.
If you don't specify a name, Amazon CloudFormation generates a name for your VPC connector.
Required: No
Type: String
Minimum:
4Maximum:
40Pattern:
[A-Za-z0-9][A-Za-z0-9\-_]{3,39}Update requires: Replacement
Return values
Ref
When the logical ID of this resource is provided to the Refintrinsic function, Refreturns the resource name.
For more information about using the Reffunction, see Ref.
Fn::GetAtt
The Fn::GetAttintrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.
For more information about using the Fn::GetAttintrinsic function, see Fn::GetAtt.
Examples
VPC connector
This example illustrates creating a VPC connector with two subnets and two security groups.
JSON
{ "Type" : "AWS::AppRunner::VpcConnector", "Properties" : { "VpcConnectorName": "my-vpc-connector", "Subnets": ["subnet-123", "subnet-456"], "SecurityGroups": ["sg-123", "sg-456"] } }
YAML
Type: AWS::AppRunner::VpcConnector Properties: VpcConnectorName: my-vpc-connector Subnets: - subnet-123 - subnet-456 SecurityGroups: - sg-123 - sg-456
See also
-
Enabling Amazon VPC access for your service in the Amazon App Runner Developer Guide