vpc_connectors
Creates, updates, deletes or gets a vpc_connector
resource or lists vpc_connectors
in a region
Overview
Name | vpc_connectors |
Type | Resource |
Description | The AWS::AppRunner::VpcConnector resource specifies an App Runner VpcConnector. |
Id | aws.apprunner.vpc_connectors |
Fields
Name | Datatype | Description |
---|---|---|
vpc_connector_name | string | A name for the VPC connector. If you don't specify a name, AWS CloudFormation generates a name for your VPC connector. |
vpc_connector_arn | string | The Amazon Resource Name (ARN) of this VPC connector. |
vpc_connector_revision | integer | The revision of this VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name. |
subnets | array | 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. |
security_groups | array | A list of IDs of security groups that App Runner should use for access to AWS 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. |
tags | array | A list of metadata items that you can associate with your VPC connector resource. A tag is a key-value pair. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Subnets, region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all vpc_connectors
in a region.
SELECT
region,
vpc_connector_name,
vpc_connector_arn,
vpc_connector_revision,
subnets,
security_groups,
tags
FROM aws.apprunner.vpc_connectors
WHERE region = 'us-east-1';
Gets all properties from an individual vpc_connector
.
SELECT
region,
vpc_connector_name,
vpc_connector_arn,
vpc_connector_revision,
subnets,
security_groups,
tags
FROM aws.apprunner.vpc_connectors
WHERE region = 'us-east-1' AND data__Identifier = '<VpcConnectorArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new vpc_connector
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.apprunner.vpc_connectors (
Subnets,
region
)
SELECT
'{{ Subnets }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.apprunner.vpc_connectors (
VpcConnectorName,
Subnets,
SecurityGroups,
Tags,
region
)
SELECT
'{{ VpcConnectorName }}',
'{{ Subnets }}',
'{{ SecurityGroups }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: vpc_connector
props:
- name: VpcConnectorName
value: '{{ VpcConnectorName }}'
- name: Subnets
value:
- '{{ Subnets[0] }}'
- name: SecurityGroups
value:
- '{{ SecurityGroups[0] }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.apprunner.vpc_connectors
WHERE data__Identifier = '<VpcConnectorArn>'
AND region = 'us-east-1';
Permissions
To operate on the vpc_connectors
resource, the following permissions are required:
Create
iam:CreateServiceLinkedRole,
apprunner:CreateVpcConnector,
apprunner:DescribeVpcConnector,
apprunner:TagResource,
ec2:DescribeSubnets,
ec2:DescribeSecurityGroups
Read
apprunner:DescribeVpcConnector
Delete
apprunner:DeleteVpcConnector
List
apprunner:ListVpcConnectors