terraconstructs 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +105205 -35113
- package/lib/aws/arn.js +1 -1
- package/lib/aws/aws-construct.d.ts +1 -1
- package/lib/aws/aws-construct.js +28 -2
- package/lib/aws/aws-stack.d.ts +2 -4
- package/lib/aws/aws-stack.js +21 -8
- package/lib/aws/aws-tags.d.ts +58 -0
- package/lib/aws/aws-tags.js +77 -0
- package/lib/aws/cloudwatch/actions/ec2.js +1 -1
- package/lib/aws/cloudwatch/actions/lambda.js +1 -1
- package/lib/aws/cloudwatch/alarm-base.js +1 -1
- package/lib/aws/cloudwatch/alarm-rule.js +1 -1
- package/lib/aws/cloudwatch/alarm-status-widget.js +1 -1
- package/lib/aws/cloudwatch/alarm.js +1 -1
- package/lib/aws/cloudwatch/composite-alarm.js +1 -1
- package/lib/aws/cloudwatch/dashboard.js +1 -1
- package/lib/aws/cloudwatch/data-protection-policy.js +3 -3
- package/lib/aws/cloudwatch/graph.js +8 -8
- package/lib/aws/cloudwatch/layout.js +3 -3
- package/lib/aws/cloudwatch/log-destinations/kinesis.js +1 -1
- package/lib/aws/cloudwatch/log-destinations/lambda.js +1 -1
- package/lib/aws/cloudwatch/log-group.js +1 -1
- package/lib/aws/cloudwatch/log-query.js +1 -1
- package/lib/aws/cloudwatch/log-stream.js +1 -1
- package/lib/aws/cloudwatch/metric-filter.d.ts +1 -1
- package/lib/aws/cloudwatch/metric-filter.js +4 -4
- package/lib/aws/cloudwatch/metric.js +2 -2
- package/lib/aws/cloudwatch/pattern.js +3 -3
- package/lib/aws/cloudwatch/policy.js +1 -1
- package/lib/aws/cloudwatch/private/env-tokens.js +5 -6
- package/lib/aws/cloudwatch/private/metric-util.js +4 -5
- package/lib/aws/cloudwatch/private/object.js +2 -3
- package/lib/aws/cloudwatch/private/rendering.js +3 -3
- package/lib/aws/cloudwatch/private/statistic.js +6 -7
- package/lib/aws/cloudwatch/query-definition.js +2 -2
- package/lib/aws/cloudwatch/stats.js +1 -1
- package/lib/aws/cloudwatch/subscription-filter.d.ts +1 -1
- package/lib/aws/cloudwatch/subscription-filter.js +4 -4
- package/lib/aws/cloudwatch/text.js +1 -1
- package/lib/aws/cloudwatch/variable.js +3 -3
- package/lib/aws/cloudwatch/widget.d.ts +1 -1
- package/lib/aws/cloudwatch/widget.js +4 -4
- package/lib/aws/compute/activity.js +3 -2
- package/lib/aws/compute/alb/application-listener-action.d.ts +334 -0
- package/lib/aws/compute/alb/application-listener-action.js +281 -0
- package/lib/aws/compute/alb/application-listener-certificate.d.ts +35 -0
- package/lib/aws/compute/alb/application-listener-certificate.js +35 -0
- package/lib/aws/compute/alb/application-listener-rule.d.ts +233 -0
- package/lib/aws/compute/alb/application-listener-rule.js +220 -0
- package/lib/aws/compute/alb/application-listener.d.ts +574 -0
- package/lib/aws/compute/alb/application-listener.js +538 -0
- package/lib/aws/compute/alb/application-load-balancer.d.ts +715 -0
- package/lib/aws/compute/alb/application-load-balancer.js +780 -0
- package/lib/aws/compute/alb/application-target-group.d.ts +339 -0
- package/lib/aws/compute/alb/application-target-group.js +427 -0
- package/lib/aws/compute/alb/conditions.d.ts +61 -0
- package/lib/aws/compute/alb/conditions.js +164 -0
- package/lib/aws/compute/alb/trust-store-revocation.d.ts +59 -0
- package/lib/aws/compute/alb/trust-store-revocation.js +46 -0
- package/lib/aws/compute/alb/trust-store.d.ts +86 -0
- package/lib/aws/compute/alb/trust-store.js +79 -0
- package/lib/aws/compute/architecture.js +1 -1
- package/lib/aws/compute/aspects/require-imdsv2-aspect.d.ts +75 -0
- package/lib/aws/compute/aspects/require-imdsv2-aspect.js +106 -0
- package/lib/aws/compute/bastion-host.d.ts +172 -0
- package/lib/aws/compute/bastion-host.js +114 -0
- package/lib/aws/compute/chain.js +1 -1
- package/lib/aws/compute/cidr-splits.d.ts +49 -0
- package/lib/aws/compute/cidr-splits.js +59 -0
- package/lib/aws/compute/client-vpn-authorization-rule.d.ts +43 -0
- package/lib/aws/compute/client-vpn-authorization-rule.js +30 -0
- package/lib/aws/compute/client-vpn-endpoint-types.d.ts +62 -0
- package/lib/aws/compute/client-vpn-endpoint-types.js +25 -0
- package/lib/aws/compute/client-vpn-endpoint.d.ts +239 -0
- package/lib/aws/compute/client-vpn-endpoint.js +259 -0
- package/lib/aws/compute/client-vpn-route.d.ts +67 -0
- package/lib/aws/compute/client-vpn-route.js +57 -0
- package/lib/aws/compute/condition.js +1 -1
- package/lib/aws/compute/connections.d.ts +137 -0
- package/lib/aws/compute/connections.js +208 -0
- package/lib/aws/compute/ec2-augmentations.generated.d.ts +53 -0
- package/lib/aws/compute/ec2-augmentations.generated.js +35 -0
- package/lib/aws/compute/ec2-canned-metrics.generated.d.ts +555 -0
- package/lib/aws/compute/ec2-canned-metrics.generated.js +681 -0
- package/lib/aws/compute/ec2-util-v2.d.ts +141 -0
- package/lib/aws/compute/ec2-util-v2.js +286 -0
- package/lib/aws/compute/ec2-util.d.ts +52 -0
- package/lib/aws/compute/ec2-util.js +138 -0
- package/lib/aws/compute/elasticloadbalancing-canned-metrics.generated.d.ts +176 -0
- package/lib/aws/compute/elasticloadbalancing-canned-metrics.generated.js +119 -0
- package/lib/aws/compute/elasticloadbalancingv2-canned-metrics.generated.d.ts +860 -0
- package/lib/aws/compute/elasticloadbalancingv2-canned-metrics.generated.js +597 -0
- package/lib/aws/compute/event-invoke-config.js +1 -1
- package/lib/aws/compute/event-source-filter.js +2 -2
- package/lib/aws/compute/event-source-mapping.js +1 -1
- package/lib/aws/compute/event-sources/s3-onfailure-destination.js +1 -1
- package/lib/aws/compute/event-sources/s3.js +1 -1
- package/lib/aws/compute/event-sources/sqs-dlq.js +1 -1
- package/lib/aws/compute/event-sources/sqs.js +1 -1
- package/lib/aws/compute/fields.js +4 -4
- package/lib/aws/compute/function-alias.js +1 -1
- package/lib/aws/compute/function-base.js +2 -2
- package/lib/aws/compute/function-destinations/event-bridge.js +1 -1
- package/lib/aws/compute/function-destinations/function.js +1 -1
- package/lib/aws/compute/function-destinations/sqs.js +1 -1
- package/lib/aws/compute/function-nodejs.js +1 -1
- package/lib/aws/compute/function-url.js +1 -1
- package/lib/aws/compute/function-vpc-config.generated.d.ts +3 -3
- package/lib/aws/compute/function-vpc-config.generated.js +1 -1
- package/lib/aws/compute/function.d.ts +1 -1
- package/lib/aws/compute/function.js +5 -5
- package/lib/aws/compute/index-alpha.d.ts +5 -0
- package/lib/aws/compute/index-alpha.js +22 -0
- package/lib/aws/compute/index.d.ts +60 -0
- package/lib/aws/compute/index.js +70 -2
- package/lib/aws/compute/instance-types.d.ts +1354 -0
- package/lib/aws/compute/instance-types.js +1683 -0
- package/lib/aws/compute/instance.d.ts +436 -0
- package/lib/aws/compute/instance.js +262 -0
- package/lib/aws/compute/ip-addresses.d.ts +249 -0
- package/lib/aws/compute/ip-addresses.js +248 -0
- package/lib/aws/compute/ipam.d.ts +309 -0
- package/lib/aws/compute/ipam.js +306 -0
- package/lib/aws/compute/key-pair.d.ts +178 -0
- package/lib/aws/compute/key-pair.js +194 -0
- package/lib/aws/compute/lambda-augmentations.generated.d.ts +65 -0
- package/lib/aws/compute/lambda-augmentations.generated.js +41 -0
- package/lib/aws/compute/lambda-canned-metrics.generated.d.ts +316 -0
- package/lib/aws/compute/lambda-canned-metrics.generated.js +119 -0
- package/lib/aws/compute/launch-template.d.ts +540 -0
- package/lib/aws/compute/launch-template.js +468 -0
- package/lib/aws/compute/lb-shared/access-logs-accounts.d.ts +7 -0
- package/lib/aws/compute/lb-shared/access-logs-accounts.js +46 -0
- package/lib/aws/compute/lb-shared/base-listener.d.ts +113 -0
- package/lib/aws/compute/lb-shared/base-listener.js +181 -0
- package/lib/aws/compute/lb-shared/base-load-balancer.d.ts +212 -0
- package/lib/aws/compute/lb-shared/base-load-balancer.js +290 -0
- package/lib/aws/compute/lb-shared/base-target-group.d.ts +382 -0
- package/lib/aws/compute/lb-shared/base-target-group.js +364 -0
- package/lib/aws/compute/lb-shared/enums.d.ts +282 -0
- package/lib/aws/compute/lb-shared/enums.js +301 -0
- package/lib/aws/compute/lb-shared/grid-lookup-types.d.ts +42 -0
- package/lib/aws/compute/lb-shared/grid-lookup-types.js +53 -0
- package/lib/aws/compute/lb-shared/imported.d.ts +24 -0
- package/lib/aws/compute/lb-shared/imported.js +27 -0
- package/lib/aws/compute/lb-shared/lb-listener-config.generated.d.ts +194 -0
- package/lib/aws/compute/lb-shared/lb-listener-config.generated.js +3 -0
- package/lib/aws/compute/lb-shared/lb-target-group-attachment-config.generated.d.ts +56 -0
- package/lib/aws/compute/lb-shared/lb-target-group-attachment-config.generated.js +3 -0
- package/lib/aws/compute/lb-shared/listener-action.d.ts +14 -0
- package/lib/aws/compute/lb-shared/listener-action.js +4 -0
- package/lib/aws/compute/lb-shared/listener-certificate.d.ts +28 -0
- package/lib/aws/compute/lb-shared/listener-certificate.js +29 -0
- package/lib/aws/compute/lb-shared/load-balancer-targets.d.ts +93 -0
- package/lib/aws/compute/lb-shared/load-balancer-targets.js +127 -0
- package/lib/aws/compute/lb-shared/util.d.ts +113 -0
- package/lib/aws/compute/lb-shared/util.js +264 -0
- package/lib/aws/compute/lb-targets/alb-target.d.ts +67 -0
- package/lib/aws/compute/lb-targets/alb-target.js +100 -0
- package/lib/aws/compute/lb-targets/index.d.ts +4 -0
- package/lib/aws/compute/lb-targets/index.js +22 -0
- package/lib/aws/compute/lb-targets/instance-target.d.ts +42 -0
- package/lib/aws/compute/lb-targets/instance-target.js +67 -0
- package/lib/aws/compute/lb-targets/ip-target.d.ts +55 -0
- package/lib/aws/compute/lb-targets/ip-target.js +79 -0
- package/lib/aws/compute/lb-targets/lambda-target.d.ts +25 -0
- package/lib/aws/compute/lb-targets/lambda-target.js +50 -0
- package/lib/aws/compute/load-balancer.d.ts +336 -0
- package/lib/aws/compute/load-balancer.js +287 -0
- package/lib/aws/compute/machine-image/amazon-linux-2022.d.ts +63 -0
- package/lib/aws/compute/machine-image/amazon-linux-2022.js +84 -0
- package/lib/aws/compute/machine-image/amazon-linux-2023.d.ts +63 -0
- package/lib/aws/compute/machine-image/amazon-linux-2023.js +84 -0
- package/lib/aws/compute/machine-image/amazon-linux2.d.ts +76 -0
- package/lib/aws/compute/machine-image/amazon-linux2.js +87 -0
- package/lib/aws/compute/machine-image/common.d.ts +181 -0
- package/lib/aws/compute/machine-image/common.js +122 -0
- package/lib/aws/compute/machine-image/index.d.ts +5 -0
- package/lib/aws/compute/machine-image/index.js +22 -0
- package/lib/aws/compute/machine-image/machine-image.d.ts +463 -0
- package/lib/aws/compute/machine-image/machine-image.js +566 -0
- package/lib/aws/compute/machine-image/utils.d.ts +2 -0
- package/lib/aws/compute/machine-image/utils.js +17 -0
- package/lib/aws/compute/nat.d.ts +325 -0
- package/lib/aws/compute/nat.js +455 -0
- package/lib/aws/compute/network-acl-types.d.ts +152 -0
- package/lib/aws/compute/network-acl-types.js +156 -0
- package/lib/aws/compute/network-acl.d.ts +285 -0
- package/lib/aws/compute/network-acl.js +207 -0
- package/lib/aws/compute/network-util.d.ts +116 -0
- package/lib/aws/compute/network-util.js +241 -0
- package/lib/aws/compute/nlb/network-listener-action.d.ts +92 -0
- package/lib/aws/compute/nlb/network-listener-action.js +146 -0
- package/lib/aws/compute/nlb/network-listener-certificate.d.ts +24 -0
- package/lib/aws/compute/nlb/network-listener-certificate.js +25 -0
- package/lib/aws/compute/nlb/network-listener.d.ts +248 -0
- package/lib/aws/compute/nlb/network-listener.js +217 -0
- package/lib/aws/compute/nlb/network-load-balancer.d.ts +315 -0
- package/lib/aws/compute/nlb/network-load-balancer.js +360 -0
- package/lib/aws/compute/nlb/network-target-group.d.ts +153 -0
- package/lib/aws/compute/nlb/network-target-group.js +223 -0
- package/lib/aws/compute/peer.d.ts +64 -0
- package/lib/aws/compute/peer.js +235 -0
- package/lib/aws/compute/placement-group.d.ts +161 -0
- package/lib/aws/compute/placement-group.js +133 -0
- package/lib/aws/compute/port.d.ts +287 -0
- package/lib/aws/compute/port.js +390 -0
- package/lib/aws/compute/prefix-list.d.ts +131 -0
- package/lib/aws/compute/prefix-list.js +114 -0
- package/lib/aws/compute/private/context-stub.d.ts +7 -0
- package/lib/aws/compute/private/context-stub.js +43 -0
- package/lib/aws/compute/private/ebs-util.d.ts +14 -0
- package/lib/aws/compute/private/ebs-util.js +145 -0
- package/lib/aws/compute/private/intrinstics.js +2 -1
- package/lib/aws/compute/private/json-path.js +8 -8
- package/lib/aws/compute/private/util.js +2 -3
- package/lib/aws/compute/route.d.ts +547 -0
- package/lib/aws/compute/route.js +469 -0
- package/lib/aws/compute/security-group.d.ts +414 -0
- package/lib/aws/compute/security-group.js +538 -0
- package/lib/aws/compute/state-graph.js +1 -1
- package/lib/aws/compute/state-machine-fragment.js +1 -1
- package/lib/aws/compute/state-machine.d.ts +2 -2
- package/lib/aws/compute/state-machine.js +14 -12
- package/lib/aws/compute/states/choice.js +1 -1
- package/lib/aws/compute/states/custom-state.js +1 -1
- package/lib/aws/compute/states/distributed-map/item-batcher.js +1 -1
- package/lib/aws/compute/states/distributed-map/item-reader.js +5 -5
- package/lib/aws/compute/states/distributed-map/result-writer.js +1 -1
- package/lib/aws/compute/states/distributed-map.js +1 -1
- package/lib/aws/compute/states/fail.js +1 -1
- package/lib/aws/compute/states/map-base.js +1 -1
- package/lib/aws/compute/states/map.js +1 -1
- package/lib/aws/compute/states/parallel.js +1 -1
- package/lib/aws/compute/states/pass.js +2 -2
- package/lib/aws/compute/states/state.js +5 -5
- package/lib/aws/compute/states/succeed.js +1 -1
- package/lib/aws/compute/states/task-base.js +2 -2
- package/lib/aws/compute/states/task.js +1 -1
- package/lib/aws/compute/states/wait.js +2 -2
- package/lib/aws/compute/stepfunctions-canned-metrics.generated.d.ts +83 -0
- package/lib/aws/compute/stepfunctions-canned-metrics.generated.js +127 -0
- package/lib/aws/compute/subnet-v2.d.ts +213 -0
- package/lib/aws/compute/subnet-v2.js +405 -0
- package/lib/aws/compute/subnet.d.ts +37 -0
- package/lib/aws/compute/subnet.js +181 -0
- package/lib/aws/compute/task-credentials.js +1 -1
- package/lib/aws/compute/task-input.js +1 -1
- package/lib/aws/compute/tasks/aws-sdk/call-aws-service.js +1 -1
- package/lib/aws/compute/tasks/eventbridge/put-events.js +1 -1
- package/lib/aws/compute/tasks/http/invoke.js +1 -1
- package/lib/aws/compute/tasks/lambda/invoke.js +1 -1
- package/lib/aws/compute/tasks/private/task-utils.js +3 -4
- package/lib/aws/compute/tasks/resource-arn-suffix.js +2 -3
- package/lib/aws/compute/tasks/sqs/send-message.js +1 -1
- package/lib/aws/compute/tasks/stepfunctions/invoke-activity.js +1 -1
- package/lib/aws/compute/tasks/stepfunctions/start-execution.js +1 -1
- package/lib/aws/compute/types.js +2 -2
- package/lib/aws/compute/user-data.d.ts +270 -0
- package/lib/aws/compute/user-data.js +487 -0
- package/lib/aws/compute/util.d.ts +1 -1
- package/lib/aws/compute/util.js +4 -5
- package/lib/aws/compute/volume.d.ts +480 -0
- package/lib/aws/compute/volume.js +426 -0
- package/lib/aws/compute/vpc-endpoint-service.d.ts +149 -0
- package/lib/aws/compute/vpc-endpoint-service.js +90 -0
- package/lib/aws/compute/vpc-endpoint.d.ts +742 -0
- package/lib/aws/compute/vpc-endpoint.js +811 -0
- package/lib/aws/compute/vpc-flow-logs.d.ts +551 -0
- package/lib/aws/compute/vpc-flow-logs.js +693 -0
- package/lib/aws/compute/vpc-lookup.d.ts +73 -0
- package/lib/aws/compute/vpc-lookup.js +3 -0
- package/lib/aws/compute/vpc-v2-base.d.ts +353 -0
- package/lib/aws/compute/vpc-v2-base.js +493 -0
- package/lib/aws/compute/vpc-v2.d.ts +385 -0
- package/lib/aws/compute/vpc-v2.js +408 -0
- package/lib/aws/compute/vpc.d.ts +1448 -0
- package/lib/aws/compute/vpc.js +1495 -0
- package/lib/aws/compute/vpn.d.ts +443 -0
- package/lib/aws/compute/vpn.js +397 -0
- package/lib/aws/compute/windows-versions.d.ts +418 -0
- package/lib/aws/compute/windows-versions.js +426 -0
- package/lib/aws/edge/certificate-base.d.ts +20 -0
- package/lib/aws/edge/certificate-base.js +28 -0
- package/lib/aws/edge/certificate.d.ts +23 -2
- package/lib/aws/edge/certificate.js +54 -4
- package/lib/aws/edge/distribution.js +3 -3
- package/lib/aws/edge/dns-alias-record-targets.js +2 -2
- package/lib/aws/edge/dns-record.js +16 -16
- package/lib/aws/edge/dns-zone.d.ts +20 -2
- package/lib/aws/edge/dns-zone.js +25 -10
- package/lib/aws/edge/function.js +2 -2
- package/lib/aws/edge/index.d.ts +1 -0
- package/lib/aws/edge/index.js +2 -1
- package/lib/aws/edge/key-value-store.js +4 -4
- package/lib/aws/edge/origin.js +7 -5
- package/lib/aws/edge/response-headers-policy.js +1 -1
- package/lib/aws/encryption/alias.js +1 -1
- package/lib/aws/encryption/key.js +1 -1
- package/lib/aws/encryption/via-service-principal.js +1 -1
- package/lib/aws/iam/grant.js +2 -2
- package/lib/aws/iam/index.d.ts +1 -0
- package/lib/aws/iam/index.js +2 -1
- package/lib/aws/iam/instance-profile.d.ts +155 -0
- package/lib/aws/iam/instance-profile.js +124 -0
- package/lib/aws/iam/managed-policy.js +1 -1
- package/lib/aws/iam/oidc-provider.js +1 -1
- package/lib/aws/iam/policy-document-config.generated.d.ts +8 -8
- package/lib/aws/iam/policy-document-config.generated.js +1 -1
- package/lib/aws/iam/policy-document.js +1 -1
- package/lib/aws/iam/policy-statement-props.generated.d.ts +8 -8
- package/lib/aws/iam/policy-statement-props.generated.js +1 -1
- package/lib/aws/iam/policy-statement.js +9 -9
- package/lib/aws/iam/policy.js +1 -1
- package/lib/aws/iam/principals.js +26 -26
- package/lib/aws/iam/private/assume-role-policy.js +2 -3
- package/lib/aws/iam/private/comparable-principal.js +2 -3
- package/lib/aws/iam/private/immutable-role.d.ts +2 -1
- package/lib/aws/iam/private/immutable-role.js +3 -3
- package/lib/aws/iam/private/imported-role.d.ts +1 -1
- package/lib/aws/iam/private/imported-role.js +3 -3
- package/lib/aws/iam/private/merge-statements.js +2 -3
- package/lib/aws/iam/private/util.js +4 -4
- package/lib/aws/iam/role.js +1 -1
- package/lib/aws/iam/saml-provider.d.ts +1 -1
- package/lib/aws/iam/saml-provider.js +6 -6
- package/lib/aws/iam/unknown-principal.js +1 -1
- package/lib/aws/iam/utils.js +2 -3
- package/lib/aws/index.d.ts +1 -0
- package/lib/aws/index.js +4 -1
- package/lib/aws/network/simple-ipv4-vpc.js +5 -5
- package/lib/aws/network/subnet-group.js +3 -3
- package/lib/aws/network/subnet.d.ts +1 -1
- package/lib/aws/network/subnet.js +7 -7
- package/lib/aws/notify/archive.js +3 -2
- package/lib/aws/notify/connection.js +5 -4
- package/lib/aws/notify/event-bus.js +5 -4
- package/lib/aws/notify/event-pattern.d.ts +26 -1
- package/lib/aws/notify/event-pattern.js +49 -5
- package/lib/aws/notify/index.js +3 -1
- package/lib/aws/notify/input.js +4 -3
- package/lib/aws/notify/kinesis-stream.js +3 -2
- package/lib/aws/notify/on-event-options.js +2 -1
- package/lib/aws/notify/queue-config.generated.d.ts +18 -11
- package/lib/aws/notify/queue-config.generated.js +1 -1
- package/lib/aws/notify/queue-policy.js +1 -1
- package/lib/aws/notify/queue.js +1 -1
- package/lib/aws/notify/resource-policy.js +1 -1
- package/lib/aws/notify/rule.js +3 -2
- package/lib/aws/notify/schedule.js +2 -2
- package/lib/aws/notify/sqs-augmentations.generated.d.ts +125 -0
- package/lib/aws/notify/sqs-augmentations.generated.js +74 -0
- package/lib/aws/notify/target.js +2 -1
- package/lib/aws/notify/targets/event-bus.js +1 -1
- package/lib/aws/notify/targets/function.js +1 -1
- package/lib/aws/notify/targets/log-group.js +2 -2
- package/lib/aws/notify/targets/sqs.js +1 -1
- package/lib/aws/notify/targets/state-machine.js +1 -1
- package/lib/aws/notify/targets/util.d.ts +1 -1
- package/lib/aws/notify/targets/util.js +10 -11
- package/lib/aws/notify/util.js +4 -4
- package/lib/aws/provider-config.generated.d.ts +33 -33
- package/lib/aws/provider-config.generated.js +1 -1
- package/lib/aws/storage/bucket-notifications.js +1 -1
- package/lib/aws/storage/bucket-policy.js +1 -1
- package/lib/aws/storage/bucket-source.js +1 -1
- package/lib/aws/storage/bucket.d.ts +298 -65
- package/lib/aws/storage/bucket.js +548 -225
- package/lib/aws/storage/cors-config.generated.d.ts +3 -3
- package/lib/aws/storage/cors-config.generated.js +1 -1
- package/lib/aws/storage/cors-rule-config.generated.d.ts +5 -5
- package/lib/aws/storage/cors-rule-config.generated.js +1 -1
- package/lib/aws/storage/index.d.ts +1 -0
- package/lib/aws/storage/index.js +2 -1
- package/lib/aws/storage/lifecycle-config.generated.d.ts +11 -11
- package/lib/aws/storage/lifecycle-config.generated.js +1 -1
- package/lib/aws/storage/notification-targets/function.js +6 -6
- package/lib/aws/storage/notification-targets/queue.js +1 -1
- package/lib/aws/storage/origin-access-identity.d.ts +1 -1
- package/lib/aws/storage/origin-access-identity.js +5 -4
- package/lib/aws/storage/parameter-util.d.ts +12 -0
- package/lib/aws/storage/parameter-util.js +65 -0
- package/lib/aws/storage/parameter.d.ts +526 -0
- package/lib/aws/storage/parameter.js +606 -0
- package/lib/aws/storage/s3-canned-metrics.generated.d.ts +22 -0
- package/lib/aws/storage/s3-canned-metrics.generated.js +23 -0
- package/lib/aws/storage/util.d.ts +25 -3
- package/lib/aws/storage/util.js +84 -17
- package/lib/aws/storage/website-config.generated.d.ts +5 -5
- package/lib/aws/storage/website-config.generated.js +1 -1
- package/lib/aws/util.js +2 -3
- package/lib/construct-base.d.ts +10 -1
- package/lib/construct-base.js +9 -6
- package/lib/duration.js +1 -1
- package/lib/expiration.d.ts +48 -0
- package/lib/expiration.js +68 -0
- package/lib/helpers-internal/index.d.ts +1 -0
- package/lib/helpers-internal/index.js +7 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +3 -1
- package/lib/private/md5.d.ts +4 -0
- package/lib/private/md5.js +14 -0
- package/lib/private/unique-resource-name.js +3 -4
- package/lib/size.js +2 -2
- package/lib/stack-base.d.ts +4 -23
- package/lib/stack-base.js +9 -30
- package/lib/terra-func.d.ts +103 -0
- package/lib/terra-func.js +170 -0
- package/lib/token.js +5 -5
- package/package.json +15 -8
- package/bun.lockb +0 -0
|
@@ -0,0 +1,1448 @@
|
|
|
1
|
+
import { natGateway, subnet } from "@cdktf/provider-aws";
|
|
2
|
+
import { Construct, IConstruct, IDependable } from "constructs";
|
|
3
|
+
import { ClientVpnEndpoint, ClientVpnEndpointOptions } from "./client-vpn-endpoint";
|
|
4
|
+
import { IIpAddresses, IIpv6Addresses } from "./ip-addresses";
|
|
5
|
+
import { NatProvider } from "./nat";
|
|
6
|
+
import { INetworkAcl } from "./network-acl";
|
|
7
|
+
import { SubnetFilter } from "./subnet";
|
|
8
|
+
import { GatewayVpcEndpoint, GatewayVpcEndpointOptions, InterfaceVpcEndpoint, InterfaceVpcEndpointOptions } from "./vpc-endpoint";
|
|
9
|
+
import { FlowLog, FlowLogOptions } from "./vpc-flow-logs";
|
|
10
|
+
import { EnableVpnGatewayOptions, VpnConnection, VpnConnectionOptions } from "./vpn";
|
|
11
|
+
import { AwsConstructBase, IAwsConstruct } from "../aws-construct";
|
|
12
|
+
/**
|
|
13
|
+
* Outputs which may be registered for output via the Grid.
|
|
14
|
+
*/
|
|
15
|
+
export interface SubnetOutputs {
|
|
16
|
+
/**
|
|
17
|
+
* The subnetId for this particular subnet
|
|
18
|
+
* @attribute
|
|
19
|
+
*/
|
|
20
|
+
readonly subnetId: string;
|
|
21
|
+
/**
|
|
22
|
+
* The IPv4 CIDR block for this subnet
|
|
23
|
+
*/
|
|
24
|
+
readonly ipv4CidrBlock: string;
|
|
25
|
+
/**
|
|
26
|
+
* The route table for this subnet
|
|
27
|
+
* @attribute
|
|
28
|
+
*/
|
|
29
|
+
readonly routeTableId: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ISubnet extends IAwsConstruct {
|
|
32
|
+
/** Strongly typed outputs */
|
|
33
|
+
readonly subnetOutputs: SubnetOutputs;
|
|
34
|
+
/**
|
|
35
|
+
* The Availability Zone the subnet is located in
|
|
36
|
+
*/
|
|
37
|
+
readonly availabilityZone: string;
|
|
38
|
+
/**
|
|
39
|
+
* The subnetId for this particular subnet
|
|
40
|
+
* @attribute
|
|
41
|
+
*/
|
|
42
|
+
readonly subnetId: string;
|
|
43
|
+
/**
|
|
44
|
+
* Dependable that can be depended upon to force internet connectivity established on the VPC
|
|
45
|
+
*/
|
|
46
|
+
readonly internetConnectivityEstablished: IDependable;
|
|
47
|
+
/**
|
|
48
|
+
* The IPv4 CIDR block for this subnet
|
|
49
|
+
*/
|
|
50
|
+
readonly ipv4CidrBlock: string;
|
|
51
|
+
/**
|
|
52
|
+
* The route table for this subnet
|
|
53
|
+
*/
|
|
54
|
+
readonly routeTable: IRouteTable;
|
|
55
|
+
/**
|
|
56
|
+
* Associate a Network ACL with this subnet
|
|
57
|
+
*
|
|
58
|
+
* @param acl The Network ACL to associate
|
|
59
|
+
*/
|
|
60
|
+
associateNetworkAcl(id: string, acl: INetworkAcl): void;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Outputs which may be registered for output via the Grid.
|
|
64
|
+
*/
|
|
65
|
+
export interface RouteTableOutputs {
|
|
66
|
+
/**
|
|
67
|
+
* The route table ID
|
|
68
|
+
* @attribute
|
|
69
|
+
*/
|
|
70
|
+
readonly routeTableId: string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* An abstract route table
|
|
74
|
+
*/
|
|
75
|
+
export interface IRouteTable {
|
|
76
|
+
/**
|
|
77
|
+
* Route table ID
|
|
78
|
+
*/
|
|
79
|
+
readonly routeTableId: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Outputs which may be registered for output via the Grid.
|
|
83
|
+
*/
|
|
84
|
+
export interface VpcOutputs {
|
|
85
|
+
/**
|
|
86
|
+
* Identifier for this VPC
|
|
87
|
+
* @attribute
|
|
88
|
+
*/
|
|
89
|
+
readonly vpcId: string;
|
|
90
|
+
/**
|
|
91
|
+
* ARN for this VPC
|
|
92
|
+
* @attribute
|
|
93
|
+
*/
|
|
94
|
+
readonly vpcArn: string;
|
|
95
|
+
/**
|
|
96
|
+
* CIDR range for this VPC
|
|
97
|
+
*
|
|
98
|
+
* @attribute
|
|
99
|
+
*/
|
|
100
|
+
readonly vpcCidrBlock: string;
|
|
101
|
+
/**
|
|
102
|
+
* List of public subnets in this VPC
|
|
103
|
+
*
|
|
104
|
+
* @attribute
|
|
105
|
+
*/
|
|
106
|
+
readonly publicSubnetIds: string[];
|
|
107
|
+
/**
|
|
108
|
+
* List of private subnets in this VPC
|
|
109
|
+
*
|
|
110
|
+
* @attribute
|
|
111
|
+
*/
|
|
112
|
+
readonly privateSubnetIds: string[];
|
|
113
|
+
/**
|
|
114
|
+
* List of isolated subnets in this VPC
|
|
115
|
+
*
|
|
116
|
+
* @attribute
|
|
117
|
+
*/
|
|
118
|
+
readonly isolatedSubnetIds: string[];
|
|
119
|
+
/**
|
|
120
|
+
* AZs for this VPC
|
|
121
|
+
*
|
|
122
|
+
* @attribute
|
|
123
|
+
*/
|
|
124
|
+
readonly availabilityZones: string[];
|
|
125
|
+
/**
|
|
126
|
+
* Identifier for the VPN gateway
|
|
127
|
+
*
|
|
128
|
+
* @attribute
|
|
129
|
+
*/
|
|
130
|
+
readonly vpnGatewayId?: string;
|
|
131
|
+
}
|
|
132
|
+
export interface IVpc extends IAwsConstruct {
|
|
133
|
+
/** Strongly typed outputs */
|
|
134
|
+
readonly vpcOutputs: VpcOutputs;
|
|
135
|
+
/**
|
|
136
|
+
* Identifier for this VPC
|
|
137
|
+
* @attribute
|
|
138
|
+
*/
|
|
139
|
+
readonly vpcId: string;
|
|
140
|
+
/**
|
|
141
|
+
* ARN for this VPC
|
|
142
|
+
* @attribute
|
|
143
|
+
*/
|
|
144
|
+
readonly vpcArn: string;
|
|
145
|
+
/**
|
|
146
|
+
* CIDR range for this VPC
|
|
147
|
+
*
|
|
148
|
+
* @attribute
|
|
149
|
+
*/
|
|
150
|
+
readonly vpcCidrBlock: string;
|
|
151
|
+
/**
|
|
152
|
+
* List of public subnets in this VPC
|
|
153
|
+
*/
|
|
154
|
+
readonly publicSubnets: ISubnet[];
|
|
155
|
+
/**
|
|
156
|
+
* List of private subnets in this VPC
|
|
157
|
+
*/
|
|
158
|
+
readonly privateSubnets: ISubnet[];
|
|
159
|
+
/**
|
|
160
|
+
* List of isolated subnets in this VPC
|
|
161
|
+
*/
|
|
162
|
+
readonly isolatedSubnets: ISubnet[];
|
|
163
|
+
/**
|
|
164
|
+
* AZs for this VPC
|
|
165
|
+
*/
|
|
166
|
+
readonly availabilityZones: string[];
|
|
167
|
+
/**
|
|
168
|
+
* Identifier for the VPN gateway
|
|
169
|
+
*/
|
|
170
|
+
readonly vpnGatewayId?: string;
|
|
171
|
+
/**
|
|
172
|
+
* Dependable that can be depended upon to force internet connectivity established on the VPC
|
|
173
|
+
*/
|
|
174
|
+
readonly internetConnectivityEstablished: IDependable;
|
|
175
|
+
/**
|
|
176
|
+
* Return information on the subnets appropriate for the given selection strategy
|
|
177
|
+
*
|
|
178
|
+
* Requires that at least one subnet is matched, throws a descriptive
|
|
179
|
+
* error message otherwise.
|
|
180
|
+
*/
|
|
181
|
+
selectSubnets(selection?: SubnetSelection): SelectedSubnets;
|
|
182
|
+
/**
|
|
183
|
+
* Adds a VPN Gateway to this VPC
|
|
184
|
+
*/
|
|
185
|
+
enableVpnGateway(options: EnableVpnGatewayOptions): void;
|
|
186
|
+
/**
|
|
187
|
+
* Adds a new VPN connection to this VPC
|
|
188
|
+
*/
|
|
189
|
+
addVpnConnection(id: string, options: VpnConnectionOptions): VpnConnection;
|
|
190
|
+
/**
|
|
191
|
+
* Adds a new client VPN endpoint to this VPC
|
|
192
|
+
*/
|
|
193
|
+
addClientVpnEndpoint(id: string, options: ClientVpnEndpointOptions): ClientVpnEndpoint;
|
|
194
|
+
/**
|
|
195
|
+
* Adds a new gateway endpoint to this VPC
|
|
196
|
+
*/
|
|
197
|
+
addGatewayEndpoint(id: string, options: GatewayVpcEndpointOptions): GatewayVpcEndpoint;
|
|
198
|
+
/**
|
|
199
|
+
* Adds a new interface endpoint to this VPC
|
|
200
|
+
*/
|
|
201
|
+
addInterfaceEndpoint(id: string, options: InterfaceVpcEndpointOptions): InterfaceVpcEndpoint;
|
|
202
|
+
/**
|
|
203
|
+
* Adds a new Flow Log to this VPC
|
|
204
|
+
*/
|
|
205
|
+
addFlowLog(id: string, options?: FlowLogOptions): FlowLog;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* The types of IP addresses provisioned in the VPC.
|
|
209
|
+
*/
|
|
210
|
+
export declare enum IpProtocol {
|
|
211
|
+
/**
|
|
212
|
+
* The vpc will be configured with only IPv4 addresses.
|
|
213
|
+
*
|
|
214
|
+
* This is the default protocol if unset.
|
|
215
|
+
*/
|
|
216
|
+
IPV4_ONLY = "Ipv4_Only",
|
|
217
|
+
/**
|
|
218
|
+
* The vpc will have both IPv4 and IPv6 addresses.
|
|
219
|
+
*
|
|
220
|
+
* Unless specified, public IPv4 addresses will not be auto assigned,
|
|
221
|
+
* an egress only internet gateway (EIGW) will be created and configured,
|
|
222
|
+
* and NATs and internet gateways (IGW) will be configured with IPv6 addresses.
|
|
223
|
+
*/
|
|
224
|
+
DUAL_STACK = "Dual_Stack"
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* The type of Subnet
|
|
228
|
+
*/
|
|
229
|
+
export declare enum SubnetType {
|
|
230
|
+
/**
|
|
231
|
+
* Isolated Subnets do not route traffic to the Internet (in this VPC),
|
|
232
|
+
* and as such, do not require NAT gateways.
|
|
233
|
+
*
|
|
234
|
+
* Isolated subnets can only connect to or be connected to from other
|
|
235
|
+
* instances in the same VPC. A default VPC configuration will not include
|
|
236
|
+
* isolated subnets.
|
|
237
|
+
*
|
|
238
|
+
* This can be good for subnets with RDS or Elasticache instances,
|
|
239
|
+
* or which route Internet traffic through a peer VPC.
|
|
240
|
+
*/
|
|
241
|
+
PRIVATE_ISOLATED = "Isolated",
|
|
242
|
+
/**
|
|
243
|
+
* Isolated Subnets do not route traffic to the Internet (in this VPC),
|
|
244
|
+
* and as such, do not require NAT gateways.
|
|
245
|
+
*
|
|
246
|
+
* Isolated subnets can only connect to or be connected to from other
|
|
247
|
+
* instances in the same VPC. A default VPC configuration will not include
|
|
248
|
+
* isolated subnets.
|
|
249
|
+
*
|
|
250
|
+
* This can be good for subnets with RDS or Elasticache instances,
|
|
251
|
+
* or which route Internet traffic through a peer VPC.
|
|
252
|
+
*
|
|
253
|
+
* @deprecated use `SubnetType.PRIVATE_ISOLATED`
|
|
254
|
+
*/
|
|
255
|
+
ISOLATED = "Deprecated_Isolated",
|
|
256
|
+
/**
|
|
257
|
+
* Subnet that routes to the internet, but not vice versa.
|
|
258
|
+
*
|
|
259
|
+
* Instances in a private subnet can connect to the Internet, but will not
|
|
260
|
+
* allow connections to be initiated from the Internet. Egress to the internet will
|
|
261
|
+
* need to be provided.
|
|
262
|
+
* NAT Gateway(s) are the default solution to providing this subnet type the ability to route Internet traffic.
|
|
263
|
+
* If a NAT Gateway is not required or desired, set `natGateways:0` or use
|
|
264
|
+
* `SubnetType.PRIVATE_ISOLATED` instead.
|
|
265
|
+
*
|
|
266
|
+
* By default, a NAT gateway is created in every public subnet for maximum availability.
|
|
267
|
+
* Be aware that you will be charged for NAT gateways.
|
|
268
|
+
*
|
|
269
|
+
* Normally a Private subnet will use a NAT gateway in the same AZ, but
|
|
270
|
+
* if `natGateways` is used to reduce the number of NAT gateways, a NAT
|
|
271
|
+
* gateway from another AZ will be used instead.
|
|
272
|
+
*/
|
|
273
|
+
PRIVATE_WITH_EGRESS = "Private",
|
|
274
|
+
/**
|
|
275
|
+
* Subnet that routes to the internet (via a NAT gateway), but not vice versa.
|
|
276
|
+
*
|
|
277
|
+
* Instances in a private subnet can connect to the Internet, but will not
|
|
278
|
+
* allow connections to be initiated from the Internet. NAT Gateway(s) are
|
|
279
|
+
* required with this subnet type to route the Internet traffic through.
|
|
280
|
+
* If a NAT Gateway is not required or desired, use `SubnetType.PRIVATE_ISOLATED` instead.
|
|
281
|
+
*
|
|
282
|
+
* By default, a NAT gateway is created in every public subnet for maximum availability.
|
|
283
|
+
* Be aware that you will be charged for NAT gateways.
|
|
284
|
+
*
|
|
285
|
+
* Normally a Private subnet will use a NAT gateway in the same AZ, but
|
|
286
|
+
* if `natGateways` is used to reduce the number of NAT gateways, a NAT
|
|
287
|
+
* gateway from another AZ will be used instead.
|
|
288
|
+
* @deprecated use `PRIVATE_WITH_EGRESS`
|
|
289
|
+
*/
|
|
290
|
+
PRIVATE_WITH_NAT = "Deprecated_Private_NAT",
|
|
291
|
+
/**
|
|
292
|
+
* Subnet that routes to the internet, but not vice versa.
|
|
293
|
+
*
|
|
294
|
+
* Instances in a private subnet can connect to the Internet, but will not
|
|
295
|
+
* allow connections to be initiated from the Internet. NAT Gateway(s) are
|
|
296
|
+
* required with this subnet type to route the Internet traffic through.
|
|
297
|
+
* If a NAT Gateway is not required or desired, use `SubnetType.PRIVATE_ISOLATED` instead.
|
|
298
|
+
*
|
|
299
|
+
* By default, a NAT gateway is created in every public subnet for maximum availability.
|
|
300
|
+
* Be aware that you will be charged for NAT gateways.
|
|
301
|
+
*
|
|
302
|
+
* Normally a Private subnet will use a NAT gateway in the same AZ, but
|
|
303
|
+
* if `natGateways` is used to reduce the number of NAT gateways, a NAT
|
|
304
|
+
* gateway from another AZ will be used instead.
|
|
305
|
+
*
|
|
306
|
+
* @deprecated use `PRIVATE_WITH_EGRESS`
|
|
307
|
+
*/
|
|
308
|
+
PRIVATE = "Deprecated_Private",
|
|
309
|
+
/**
|
|
310
|
+
* Subnet connected to the Internet
|
|
311
|
+
*
|
|
312
|
+
* Instances in a Public subnet can connect to the Internet and can be
|
|
313
|
+
* connected to from the Internet as long as they are launched with public
|
|
314
|
+
* IPs (controlled on the AutoScalingGroup or other constructs that launch
|
|
315
|
+
* instances).
|
|
316
|
+
*
|
|
317
|
+
* Public subnets route outbound traffic via an Internet Gateway.
|
|
318
|
+
*/
|
|
319
|
+
PUBLIC = "Public"
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Customize subnets that are selected for placement of ENIs
|
|
323
|
+
*
|
|
324
|
+
* Constructs that allow customization of VPC placement use parameters of this
|
|
325
|
+
* type to provide placement settings.
|
|
326
|
+
*
|
|
327
|
+
* By default, the instances are placed in the private subnets.
|
|
328
|
+
*/
|
|
329
|
+
export interface SubnetSelection {
|
|
330
|
+
/**
|
|
331
|
+
* Select all subnets of the given type
|
|
332
|
+
*
|
|
333
|
+
* At most one of `subnetType` and `subnetGroupName` can be supplied.
|
|
334
|
+
*
|
|
335
|
+
* @default SubnetType.PRIVATE_WITH_EGRESS (or ISOLATED or PUBLIC if there are no PRIVATE_WITH_EGRESS subnets)
|
|
336
|
+
*/
|
|
337
|
+
readonly subnetType?: SubnetType;
|
|
338
|
+
/**
|
|
339
|
+
* Select subnets only in the given AZs.
|
|
340
|
+
*
|
|
341
|
+
* @default no filtering on AZs is done
|
|
342
|
+
*/
|
|
343
|
+
readonly availabilityZones?: string[];
|
|
344
|
+
/**
|
|
345
|
+
* Select the subnet group with the given name
|
|
346
|
+
*
|
|
347
|
+
* Select the subnet group with the given name. This only needs
|
|
348
|
+
* to be used if you have multiple subnet groups of the same type
|
|
349
|
+
* and you need to distinguish between them. Otherwise, prefer
|
|
350
|
+
* `subnetType`.
|
|
351
|
+
*
|
|
352
|
+
* This field does not select individual subnets, it selects all subnets that
|
|
353
|
+
* share the given subnet group name. This is the name supplied in
|
|
354
|
+
* `subnetConfiguration`.
|
|
355
|
+
*
|
|
356
|
+
* At most one of `subnetType` and `subnetGroupName` can be supplied.
|
|
357
|
+
*
|
|
358
|
+
* @default - Selection by type instead of by name
|
|
359
|
+
*/
|
|
360
|
+
readonly subnetGroupName?: string;
|
|
361
|
+
/**
|
|
362
|
+
* Alias for `subnetGroupName`
|
|
363
|
+
*
|
|
364
|
+
* Select the subnet group with the given name. This only needs
|
|
365
|
+
* to be used if you have multiple subnet groups of the same type
|
|
366
|
+
* and you need to distinguish between them.
|
|
367
|
+
*
|
|
368
|
+
* @deprecated Use `subnetGroupName` instead
|
|
369
|
+
*/
|
|
370
|
+
readonly subnetName?: string;
|
|
371
|
+
/**
|
|
372
|
+
* If true, return at most one subnet per AZ
|
|
373
|
+
*
|
|
374
|
+
* @default false
|
|
375
|
+
*/
|
|
376
|
+
readonly onePerAz?: boolean;
|
|
377
|
+
/**
|
|
378
|
+
* List of provided subnet filters.
|
|
379
|
+
*
|
|
380
|
+
* @default - none
|
|
381
|
+
*/
|
|
382
|
+
readonly subnetFilters?: SubnetFilter[];
|
|
383
|
+
/**
|
|
384
|
+
* Explicitly select individual subnets
|
|
385
|
+
*
|
|
386
|
+
* Use this if you don't want to automatically use all subnets in
|
|
387
|
+
* a group, but have a need to control selection down to
|
|
388
|
+
* individual subnets.
|
|
389
|
+
*
|
|
390
|
+
* Cannot be specified together with `subnetType` or `subnetGroupName`.
|
|
391
|
+
*
|
|
392
|
+
* @default - Use all subnets in a selected group (all private subnets by default)
|
|
393
|
+
*/
|
|
394
|
+
readonly subnets?: ISubnet[];
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Result of selecting a subset of subnets from a VPC
|
|
398
|
+
*/
|
|
399
|
+
export interface SelectedSubnets {
|
|
400
|
+
/**
|
|
401
|
+
* The subnet IDs
|
|
402
|
+
*/
|
|
403
|
+
readonly subnetIds: string[];
|
|
404
|
+
/**
|
|
405
|
+
* The respective AZs of each subnet
|
|
406
|
+
*/
|
|
407
|
+
readonly availabilityZones: string[];
|
|
408
|
+
/**
|
|
409
|
+
* Dependency representing internet connectivity for these subnets
|
|
410
|
+
*/
|
|
411
|
+
readonly internetConnectivityEstablished: IDependable;
|
|
412
|
+
/**
|
|
413
|
+
* Selected subnet objects
|
|
414
|
+
*/
|
|
415
|
+
readonly subnets: ISubnet[];
|
|
416
|
+
/**
|
|
417
|
+
* Whether any of the given subnets are from the VPC's public subnets.
|
|
418
|
+
*/
|
|
419
|
+
readonly hasPublic: boolean;
|
|
420
|
+
/**
|
|
421
|
+
* The subnet selection is not actually real yet
|
|
422
|
+
*
|
|
423
|
+
* If this value is true, don't validate anything about the subnets. The count
|
|
424
|
+
* or identities are not known yet, and the validation will most likely fail
|
|
425
|
+
* which will prevent a successful lookup.
|
|
426
|
+
*
|
|
427
|
+
* @default false
|
|
428
|
+
*/
|
|
429
|
+
readonly isPendingLookup?: boolean;
|
|
430
|
+
}
|
|
431
|
+
/**
|
|
432
|
+
* A new or imported VPC
|
|
433
|
+
*/
|
|
434
|
+
declare abstract class VpcBase extends AwsConstructBase implements IVpc {
|
|
435
|
+
/**
|
|
436
|
+
* Identifier for this VPC
|
|
437
|
+
*/
|
|
438
|
+
abstract readonly vpcId: string;
|
|
439
|
+
/**
|
|
440
|
+
* Arn of this VPC
|
|
441
|
+
*/
|
|
442
|
+
abstract readonly vpcArn: string;
|
|
443
|
+
/**
|
|
444
|
+
* CIDR range for this VPC
|
|
445
|
+
*/
|
|
446
|
+
abstract readonly vpcCidrBlock: string;
|
|
447
|
+
/**
|
|
448
|
+
* List of public subnets in this VPC
|
|
449
|
+
*/
|
|
450
|
+
abstract readonly publicSubnets: ISubnet[];
|
|
451
|
+
/**
|
|
452
|
+
* List of private subnets in this VPC
|
|
453
|
+
*/
|
|
454
|
+
abstract readonly privateSubnets: ISubnet[];
|
|
455
|
+
/**
|
|
456
|
+
* List of isolated subnets in this VPC
|
|
457
|
+
*/
|
|
458
|
+
abstract readonly isolatedSubnets: ISubnet[];
|
|
459
|
+
/**
|
|
460
|
+
* AZs for this VPC
|
|
461
|
+
*/
|
|
462
|
+
abstract readonly availabilityZones: string[];
|
|
463
|
+
/**
|
|
464
|
+
* Dependencies for internet connectivity
|
|
465
|
+
*/
|
|
466
|
+
abstract readonly internetConnectivityEstablished: IDependable;
|
|
467
|
+
get vpcOutputs(): VpcOutputs;
|
|
468
|
+
get outputs(): Record<string, any>;
|
|
469
|
+
/**
|
|
470
|
+
* Dependencies for NAT connectivity
|
|
471
|
+
*
|
|
472
|
+
* @deprecated - This value is no longer used.
|
|
473
|
+
*/
|
|
474
|
+
protected readonly natDependencies: IConstruct[];
|
|
475
|
+
/**
|
|
476
|
+
* If this is set to true, don't error out on trying to select subnets
|
|
477
|
+
*/
|
|
478
|
+
protected incompleteSubnetDefinition: boolean;
|
|
479
|
+
/**
|
|
480
|
+
* Mutable private field for the vpnGatewayId
|
|
481
|
+
*
|
|
482
|
+
* @internal
|
|
483
|
+
*/
|
|
484
|
+
protected _vpnGatewayId?: string;
|
|
485
|
+
/**
|
|
486
|
+
* Returns IDs of selected subnets
|
|
487
|
+
*/
|
|
488
|
+
selectSubnets(selection?: SubnetSelection): SelectedSubnets;
|
|
489
|
+
/**
|
|
490
|
+
* Adds a VPN Gateway to this VPC
|
|
491
|
+
*/
|
|
492
|
+
enableVpnGateway(options: EnableVpnGatewayOptions): void;
|
|
493
|
+
/**
|
|
494
|
+
* Adds a new VPN connection to this VPC
|
|
495
|
+
*/
|
|
496
|
+
addVpnConnection(id: string, options: VpnConnectionOptions): VpnConnection;
|
|
497
|
+
/**
|
|
498
|
+
* Adds a new client VPN endpoint to this VPC
|
|
499
|
+
*/
|
|
500
|
+
addClientVpnEndpoint(id: string, options: ClientVpnEndpointOptions): ClientVpnEndpoint;
|
|
501
|
+
/**
|
|
502
|
+
* Adds a new interface endpoint to this VPC
|
|
503
|
+
*/
|
|
504
|
+
addInterfaceEndpoint(id: string, options: InterfaceVpcEndpointOptions): InterfaceVpcEndpoint;
|
|
505
|
+
/**
|
|
506
|
+
* Adds a new gateway endpoint to this VPC
|
|
507
|
+
*/
|
|
508
|
+
addGatewayEndpoint(id: string, options: GatewayVpcEndpointOptions): GatewayVpcEndpoint;
|
|
509
|
+
/**
|
|
510
|
+
* Adds a new flow log to this VPC
|
|
511
|
+
*/
|
|
512
|
+
addFlowLog(id: string, options?: FlowLogOptions): FlowLog;
|
|
513
|
+
/**
|
|
514
|
+
* Returns the id of the VPN Gateway (if enabled)
|
|
515
|
+
*/
|
|
516
|
+
get vpnGatewayId(): string | undefined;
|
|
517
|
+
/**
|
|
518
|
+
* Return the subnets appropriate for the placement strategy
|
|
519
|
+
*/
|
|
520
|
+
protected selectSubnetObjects(selection?: SubnetSelection): ISubnet[];
|
|
521
|
+
private applySubnetFilters;
|
|
522
|
+
private selectSubnetObjectsByName;
|
|
523
|
+
private selectSubnetObjectsByType;
|
|
524
|
+
/**
|
|
525
|
+
* Validate the fields in a SubnetSelection object, and reify defaults if necessary
|
|
526
|
+
*
|
|
527
|
+
* In case of default selection, select the first type of PRIVATE, ISOLATED,
|
|
528
|
+
* PUBLIC (in that order) that has any subnets.
|
|
529
|
+
*/
|
|
530
|
+
private reifySelectionDefaults;
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Properties that reference an external Vpc
|
|
534
|
+
*/
|
|
535
|
+
export interface VpcAttributes {
|
|
536
|
+
/**
|
|
537
|
+
* VPC's identifier
|
|
538
|
+
*/
|
|
539
|
+
readonly vpcId: string;
|
|
540
|
+
/**
|
|
541
|
+
* VPC's CIDR range
|
|
542
|
+
*
|
|
543
|
+
* @default - Retrieving the CIDR from the VPC will fail
|
|
544
|
+
*/
|
|
545
|
+
readonly vpcCidrBlock?: string;
|
|
546
|
+
/**
|
|
547
|
+
* List of availability zones for the subnets in this VPC.
|
|
548
|
+
*/
|
|
549
|
+
readonly availabilityZones: string[];
|
|
550
|
+
/**
|
|
551
|
+
* List of public subnet IDs
|
|
552
|
+
*
|
|
553
|
+
* Must be undefined or match the availability zones in length and order.
|
|
554
|
+
*
|
|
555
|
+
* @default - The VPC does not have any public subnets
|
|
556
|
+
*/
|
|
557
|
+
readonly publicSubnetIds?: string[];
|
|
558
|
+
/**
|
|
559
|
+
* List of names for the public subnets
|
|
560
|
+
*
|
|
561
|
+
* Must be undefined or have a name for every public subnet group.
|
|
562
|
+
*
|
|
563
|
+
* @default - All public subnets will have the name `Public`
|
|
564
|
+
*/
|
|
565
|
+
readonly publicSubnetNames?: string[];
|
|
566
|
+
/**
|
|
567
|
+
* List of IDs of route tables for the public subnets.
|
|
568
|
+
*
|
|
569
|
+
* Must be undefined or have a name for every public subnet group.
|
|
570
|
+
*
|
|
571
|
+
* @default - Retrieving the route table ID of any public subnet will fail
|
|
572
|
+
*/
|
|
573
|
+
readonly publicSubnetRouteTableIds?: string[];
|
|
574
|
+
/**
|
|
575
|
+
* List of IPv4 CIDR blocks for the public subnets.
|
|
576
|
+
*
|
|
577
|
+
* Must be undefined or have an entry for every public subnet group.
|
|
578
|
+
*
|
|
579
|
+
* @default - Retrieving the IPv4 CIDR block of any public subnet will fail
|
|
580
|
+
*/
|
|
581
|
+
readonly publicSubnetIpv4CidrBlocks?: string[];
|
|
582
|
+
/**
|
|
583
|
+
* List of private subnet IDs
|
|
584
|
+
*
|
|
585
|
+
* Must be undefined or match the availability zones in length and order.
|
|
586
|
+
*
|
|
587
|
+
* @default - The VPC does not have any private subnets
|
|
588
|
+
*/
|
|
589
|
+
readonly privateSubnetIds?: string[];
|
|
590
|
+
/**
|
|
591
|
+
* List of names for the private subnets
|
|
592
|
+
*
|
|
593
|
+
* Must be undefined or have a name for every private subnet group.
|
|
594
|
+
*
|
|
595
|
+
* @default - All private subnets will have the name `Private`
|
|
596
|
+
*/
|
|
597
|
+
readonly privateSubnetNames?: string[];
|
|
598
|
+
/**
|
|
599
|
+
* List of IDs of route tables for the private subnets.
|
|
600
|
+
*
|
|
601
|
+
* Must be undefined or have a name for every private subnet group.
|
|
602
|
+
*
|
|
603
|
+
* @default - Retrieving the route table ID of any private subnet will fail
|
|
604
|
+
*/
|
|
605
|
+
readonly privateSubnetRouteTableIds?: string[];
|
|
606
|
+
/**
|
|
607
|
+
* List of IPv4 CIDR blocks for the private subnets.
|
|
608
|
+
*
|
|
609
|
+
* Must be undefined or have an entry for every private subnet group.
|
|
610
|
+
*
|
|
611
|
+
* @default - Retrieving the IPv4 CIDR block of any private subnet will fail
|
|
612
|
+
*/
|
|
613
|
+
readonly privateSubnetIpv4CidrBlocks?: string[];
|
|
614
|
+
/**
|
|
615
|
+
* List of isolated subnet IDs
|
|
616
|
+
*
|
|
617
|
+
* Must be undefined or match the availability zones in length and order.
|
|
618
|
+
*
|
|
619
|
+
* @default - The VPC does not have any isolated subnets
|
|
620
|
+
*/
|
|
621
|
+
readonly isolatedSubnetIds?: string[];
|
|
622
|
+
/**
|
|
623
|
+
* List of names for the isolated subnets
|
|
624
|
+
*
|
|
625
|
+
* Must be undefined or have a name for every isolated subnet group.
|
|
626
|
+
*
|
|
627
|
+
* @default - All isolated subnets will have the name `Isolated`
|
|
628
|
+
*/
|
|
629
|
+
readonly isolatedSubnetNames?: string[];
|
|
630
|
+
/**
|
|
631
|
+
* List of IDs of route tables for the isolated subnets.
|
|
632
|
+
*
|
|
633
|
+
* Must be undefined or have a name for every isolated subnet group.
|
|
634
|
+
*
|
|
635
|
+
* @default - Retrieving the route table ID of any isolated subnet will fail
|
|
636
|
+
*/
|
|
637
|
+
readonly isolatedSubnetRouteTableIds?: string[];
|
|
638
|
+
/**
|
|
639
|
+
* List of IPv4 CIDR blocks for the isolated subnets.
|
|
640
|
+
*
|
|
641
|
+
* Must be undefined or have an entry for every isolated subnet group.
|
|
642
|
+
*
|
|
643
|
+
* @default - Retrieving the IPv4 CIDR block of any isolated subnet will fail
|
|
644
|
+
*/
|
|
645
|
+
readonly isolatedSubnetIpv4CidrBlocks?: string[];
|
|
646
|
+
/**
|
|
647
|
+
* VPN gateway's identifier
|
|
648
|
+
*/
|
|
649
|
+
readonly vpnGatewayId?: string;
|
|
650
|
+
/**
|
|
651
|
+
* The region the VPC is in
|
|
652
|
+
*
|
|
653
|
+
* @default - The region of the stack where the VPC belongs to
|
|
654
|
+
*/
|
|
655
|
+
readonly region?: string;
|
|
656
|
+
}
|
|
657
|
+
export interface SubnetAttributes {
|
|
658
|
+
/**
|
|
659
|
+
* The Availability Zone the subnet is located in
|
|
660
|
+
*
|
|
661
|
+
* @default - No AZ information, cannot use AZ selection features
|
|
662
|
+
*/
|
|
663
|
+
readonly availabilityZone?: string;
|
|
664
|
+
/**
|
|
665
|
+
* The IPv4 CIDR block associated with the subnet
|
|
666
|
+
*
|
|
667
|
+
* @default - No CIDR information, cannot use CIDR filter features
|
|
668
|
+
*/
|
|
669
|
+
readonly ipv4CidrBlock?: string;
|
|
670
|
+
/**
|
|
671
|
+
* The ID of the route table for this particular subnet
|
|
672
|
+
*
|
|
673
|
+
* @default - No route table information, cannot create VPC endpoints
|
|
674
|
+
*/
|
|
675
|
+
readonly routeTableId?: string;
|
|
676
|
+
/**
|
|
677
|
+
* The subnetId for this particular subnet
|
|
678
|
+
*/
|
|
679
|
+
readonly subnetId: string;
|
|
680
|
+
/**
|
|
681
|
+
* Whether to register Terraform outputs for this TerraConstruct
|
|
682
|
+
*
|
|
683
|
+
* @default false
|
|
684
|
+
*/
|
|
685
|
+
readonly registerOutputs?: boolean;
|
|
686
|
+
/**
|
|
687
|
+
* Optional override for the outputs name
|
|
688
|
+
*
|
|
689
|
+
* @default id
|
|
690
|
+
*/
|
|
691
|
+
readonly outputName?: string;
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Configuration for Vpc
|
|
695
|
+
*/
|
|
696
|
+
export interface VpcProps {
|
|
697
|
+
/**
|
|
698
|
+
* The protocol of the vpc.
|
|
699
|
+
*
|
|
700
|
+
* Options are IPv4 only or dual stack.
|
|
701
|
+
*
|
|
702
|
+
* @default IpProtocol.IPV4_ONLY
|
|
703
|
+
*/
|
|
704
|
+
readonly ipProtocol?: IpProtocol;
|
|
705
|
+
/**
|
|
706
|
+
* The Provider to use to allocate IPv4 Space to your VPC.
|
|
707
|
+
*
|
|
708
|
+
* Options include static allocation or from a pool.
|
|
709
|
+
*
|
|
710
|
+
* Note this is specific to IPv4 addresses.
|
|
711
|
+
*
|
|
712
|
+
* @default compute.IpAddresses.cidr
|
|
713
|
+
*/
|
|
714
|
+
readonly ipAddresses?: IIpAddresses;
|
|
715
|
+
/**
|
|
716
|
+
* The CIDR range to use for the VPC, e.g. '10.0.0.0/16'.
|
|
717
|
+
*
|
|
718
|
+
* Should be a minimum of /28 and maximum size of /16. The range will be
|
|
719
|
+
* split across all subnets per Availability Zone.
|
|
720
|
+
*
|
|
721
|
+
* @default Vpc.DEFAULT_CIDR_RANGE
|
|
722
|
+
*
|
|
723
|
+
* @deprecated Use ipAddresses instead
|
|
724
|
+
*/
|
|
725
|
+
readonly cidr?: string;
|
|
726
|
+
/**
|
|
727
|
+
* Indicates whether the instances launched in the VPC get public DNS hostnames.
|
|
728
|
+
*
|
|
729
|
+
* If this attribute is true, instances in the VPC get public DNS hostnames,
|
|
730
|
+
* but only if the enableDnsSupport attribute is also set to true.
|
|
731
|
+
*
|
|
732
|
+
* @default true
|
|
733
|
+
*/
|
|
734
|
+
readonly enableDnsHostnames?: boolean;
|
|
735
|
+
/**
|
|
736
|
+
* Indicates whether the DNS resolution is supported for the VPC.
|
|
737
|
+
*
|
|
738
|
+
* If this attribute is false, the Amazon-provided DNS server in the VPC that
|
|
739
|
+
* resolves public DNS hostnames to IP addresses is not enabled. If this
|
|
740
|
+
* attribute is true, queries to the Amazon provided DNS server at the
|
|
741
|
+
* 169.254.169.253 IP address, or the reserved IP address at the base of the
|
|
742
|
+
* VPC IPv4 network range plus two will succeed.
|
|
743
|
+
*
|
|
744
|
+
* @default true
|
|
745
|
+
*/
|
|
746
|
+
readonly enableDnsSupport?: boolean;
|
|
747
|
+
/**
|
|
748
|
+
* The default tenancy of instances launched into the VPC.
|
|
749
|
+
*
|
|
750
|
+
* By setting this to dedicated tenancy, instances will be launched on
|
|
751
|
+
* hardware dedicated to a single AWS customer, unless specifically specified
|
|
752
|
+
* at instance launch time. Please note, not all instance types are usable
|
|
753
|
+
* with Dedicated tenancy.
|
|
754
|
+
*
|
|
755
|
+
* @default DefaultInstanceTenancy.Default (shared) tenancy
|
|
756
|
+
*/
|
|
757
|
+
readonly defaultInstanceTenancy?: DefaultInstanceTenancy;
|
|
758
|
+
/**
|
|
759
|
+
* Define the maximum number of AZs to use in this region
|
|
760
|
+
*
|
|
761
|
+
* If the region has more AZs than you want to use (for example, because of
|
|
762
|
+
* EIP limits), pick a lower number here. The AZs will be sorted and picked
|
|
763
|
+
* from the start of the list.
|
|
764
|
+
*
|
|
765
|
+
* If you pick a higher number than the number of AZs in the region, all AZs
|
|
766
|
+
* in the region will be selected. To use "all AZs" available to your
|
|
767
|
+
* account, use a high number (such as 99).
|
|
768
|
+
*
|
|
769
|
+
* Be aware that environment-agnostic stacks will be created with access to
|
|
770
|
+
* only 2 AZs, so to use more than 2 AZs, be sure to specify the account and
|
|
771
|
+
* region on your stack.
|
|
772
|
+
*
|
|
773
|
+
* Specify this option only if you do not specify `availabilityZones`.
|
|
774
|
+
*
|
|
775
|
+
* @default 3
|
|
776
|
+
*/
|
|
777
|
+
readonly maxAzs?: number;
|
|
778
|
+
/**
|
|
779
|
+
* Define the number of AZs to reserve.
|
|
780
|
+
*
|
|
781
|
+
* When specified, the IP space is reserved for the azs but no actual
|
|
782
|
+
* resources are provisioned.
|
|
783
|
+
*
|
|
784
|
+
* @default 0
|
|
785
|
+
*/
|
|
786
|
+
readonly reservedAzs?: number;
|
|
787
|
+
/**
|
|
788
|
+
* Availability zones this VPC spans.
|
|
789
|
+
*
|
|
790
|
+
* Specify this option only if you do not specify `maxAzs`.
|
|
791
|
+
*
|
|
792
|
+
* @default - a subset of AZs of the stack
|
|
793
|
+
*/
|
|
794
|
+
readonly availabilityZones?: string[];
|
|
795
|
+
/**
|
|
796
|
+
* The number of NAT Gateways/Instances to create.
|
|
797
|
+
*
|
|
798
|
+
* The type of NAT gateway or instance will be determined by the
|
|
799
|
+
* `natGatewayProvider` parameter.
|
|
800
|
+
*
|
|
801
|
+
* You can set this number lower than the number of Availability Zones in your
|
|
802
|
+
* VPC in order to save on NAT cost. Be aware you may be charged for
|
|
803
|
+
* cross-AZ data traffic instead.
|
|
804
|
+
*
|
|
805
|
+
* @default - One NAT gateway/instance per Availability Zone
|
|
806
|
+
*/
|
|
807
|
+
readonly natGateways?: number;
|
|
808
|
+
/**
|
|
809
|
+
* Configures the subnets which will have NAT Gateways/Instances
|
|
810
|
+
*
|
|
811
|
+
* You can pick a specific group of subnets by specifying the group name;
|
|
812
|
+
* the picked subnets must be public subnets.
|
|
813
|
+
*
|
|
814
|
+
* Only necessary if you have more than one public subnet group.
|
|
815
|
+
*
|
|
816
|
+
* @default - All public subnets.
|
|
817
|
+
*/
|
|
818
|
+
readonly natGatewaySubnets?: SubnetSelection;
|
|
819
|
+
/**
|
|
820
|
+
* What type of NAT provider to use
|
|
821
|
+
*
|
|
822
|
+
* Select between NAT gateways or NAT instances. NAT gateways
|
|
823
|
+
* may not be available in all AWS regions.
|
|
824
|
+
*
|
|
825
|
+
* @default NatProvider.gateway()
|
|
826
|
+
*
|
|
827
|
+
*/
|
|
828
|
+
readonly natGatewayProvider?: NatProvider;
|
|
829
|
+
/**
|
|
830
|
+
* Configure the subnets to build for each AZ
|
|
831
|
+
*
|
|
832
|
+
* Each entry in this list configures a Subnet Group; each group will contain a
|
|
833
|
+
* subnet for each Availability Zone.
|
|
834
|
+
*
|
|
835
|
+
* For example, if you want 1 public subnet, 1 private subnet, and 1 isolated
|
|
836
|
+
* subnet in each AZ provide the following:
|
|
837
|
+
*
|
|
838
|
+
* ```ts
|
|
839
|
+
* new compute.Vpc(this, 'VPC', {
|
|
840
|
+
* subnetConfiguration: [
|
|
841
|
+
* {
|
|
842
|
+
* cidrMask: 24,
|
|
843
|
+
* name: 'ingress',
|
|
844
|
+
* subnetType: compute.SubnetType.PUBLIC,
|
|
845
|
+
* },
|
|
846
|
+
* {
|
|
847
|
+
* cidrMask: 24,
|
|
848
|
+
* name: 'application',
|
|
849
|
+
* subnetType: compute.SubnetType.PRIVATE_WITH_EGRESS,
|
|
850
|
+
* },
|
|
851
|
+
* {
|
|
852
|
+
* cidrMask: 28,
|
|
853
|
+
* name: 'rds',
|
|
854
|
+
* subnetType: compute.SubnetType.PRIVATE_ISOLATED,
|
|
855
|
+
* }
|
|
856
|
+
* ]
|
|
857
|
+
* });
|
|
858
|
+
* ```
|
|
859
|
+
*
|
|
860
|
+
* @default - The VPC CIDR will be evenly divided between 1 public and 1
|
|
861
|
+
* private subnet per AZ.
|
|
862
|
+
*/
|
|
863
|
+
readonly subnetConfiguration?: SubnetConfiguration[];
|
|
864
|
+
/**
|
|
865
|
+
* Indicates whether a VPN gateway should be created and attached to this VPC.
|
|
866
|
+
*
|
|
867
|
+
* @default - true when vpnGatewayAsn or vpnConnections is specified
|
|
868
|
+
*/
|
|
869
|
+
readonly vpnGateway?: boolean;
|
|
870
|
+
/**
|
|
871
|
+
* The private Autonomous System Number (ASN) for the VPN gateway.
|
|
872
|
+
*
|
|
873
|
+
* @default - Amazon default ASN.
|
|
874
|
+
*/
|
|
875
|
+
readonly vpnGatewayAsn?: number;
|
|
876
|
+
/**
|
|
877
|
+
* VPN connections to this VPC.
|
|
878
|
+
*
|
|
879
|
+
* @default - No connections.
|
|
880
|
+
*/
|
|
881
|
+
readonly vpnConnections?: {
|
|
882
|
+
[id: string]: VpnConnectionOptions;
|
|
883
|
+
};
|
|
884
|
+
/**
|
|
885
|
+
* Where to propagate VPN routes.
|
|
886
|
+
*
|
|
887
|
+
* @default - On the route tables associated with private subnets. If no
|
|
888
|
+
* private subnets exists, isolated subnets are used. If no isolated subnets
|
|
889
|
+
* exists, public subnets are used.
|
|
890
|
+
*/
|
|
891
|
+
readonly vpnRoutePropagation?: SubnetSelection[];
|
|
892
|
+
/**
|
|
893
|
+
* Gateway endpoints to add to this VPC.
|
|
894
|
+
*
|
|
895
|
+
* @default - None.
|
|
896
|
+
*/
|
|
897
|
+
readonly gatewayEndpoints?: {
|
|
898
|
+
[id: string]: GatewayVpcEndpointOptions;
|
|
899
|
+
};
|
|
900
|
+
/**
|
|
901
|
+
* Flow logs to add to this VPC.
|
|
902
|
+
*
|
|
903
|
+
* @default - No flow logs.
|
|
904
|
+
*/
|
|
905
|
+
readonly flowLogs?: {
|
|
906
|
+
[id: string]: FlowLogOptions;
|
|
907
|
+
};
|
|
908
|
+
/**
|
|
909
|
+
* The VPC name.
|
|
910
|
+
*
|
|
911
|
+
* Since the VPC resource doesn't support providing a physical name, the value provided here will be recorded in the `Name` tag
|
|
912
|
+
*
|
|
913
|
+
* @default this.node.path
|
|
914
|
+
*/
|
|
915
|
+
readonly vpcName?: string;
|
|
916
|
+
/**
|
|
917
|
+
* If set to false then disable the creation of the default internet gateway
|
|
918
|
+
*
|
|
919
|
+
* @default true
|
|
920
|
+
*/
|
|
921
|
+
readonly createInternetGateway?: boolean;
|
|
922
|
+
/**
|
|
923
|
+
* The Provider to use to allocate IPv6 Space to your VPC.
|
|
924
|
+
*
|
|
925
|
+
* Options include amazon provided CIDR block.
|
|
926
|
+
*
|
|
927
|
+
* Note this is specific to IPv6 addresses.
|
|
928
|
+
*
|
|
929
|
+
* @default Ipv6Addresses.amazonProvided
|
|
930
|
+
*/
|
|
931
|
+
readonly ipv6Addresses?: IIpv6Addresses;
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* The default tenancy of instances launched into the VPC.
|
|
935
|
+
*/
|
|
936
|
+
export declare enum DefaultInstanceTenancy {
|
|
937
|
+
/**
|
|
938
|
+
* Instances can be launched with any tenancy.
|
|
939
|
+
*/
|
|
940
|
+
DEFAULT = "default",
|
|
941
|
+
/**
|
|
942
|
+
* Any instance launched into the VPC automatically has dedicated tenancy, unless you launch it with the default tenancy.
|
|
943
|
+
*/
|
|
944
|
+
DEDICATED = "dedicated"
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Specify configuration parameters for a single subnet group in a VPC.
|
|
948
|
+
*/
|
|
949
|
+
export interface SubnetConfiguration {
|
|
950
|
+
/**
|
|
951
|
+
* The number of leading 1 bits in the routing mask.
|
|
952
|
+
*
|
|
953
|
+
* The number of available IP addresses in each subnet of this group
|
|
954
|
+
* will be equal to `2^(32 - cidrMask) - 2`.
|
|
955
|
+
*
|
|
956
|
+
* Valid values are `16--28`.
|
|
957
|
+
*
|
|
958
|
+
* Note this is specific to IPv4 addresses.
|
|
959
|
+
*
|
|
960
|
+
* @default - Available IP space is evenly divided across subnets.
|
|
961
|
+
*/
|
|
962
|
+
readonly cidrMask?: number;
|
|
963
|
+
/**
|
|
964
|
+
* The type of Subnet to configure.
|
|
965
|
+
*
|
|
966
|
+
* The Subnet type will control the ability to route and connect to the
|
|
967
|
+
* Internet.
|
|
968
|
+
*/
|
|
969
|
+
readonly subnetType: SubnetType;
|
|
970
|
+
/**
|
|
971
|
+
* Logical name for the subnet group.
|
|
972
|
+
*
|
|
973
|
+
* This name can be used when selecting VPC subnets to distinguish
|
|
974
|
+
* between different subnet groups of the same type.
|
|
975
|
+
*/
|
|
976
|
+
readonly name: string;
|
|
977
|
+
/**
|
|
978
|
+
* Controls if subnet IP space needs to be reserved.
|
|
979
|
+
*
|
|
980
|
+
* When true, the IP space for the subnet is reserved but no actual
|
|
981
|
+
* resources are provisioned. This space is only dependent on the
|
|
982
|
+
* number of availability zones and on `cidrMask` - all other subnet
|
|
983
|
+
* properties are ignored.
|
|
984
|
+
*
|
|
985
|
+
* @default false
|
|
986
|
+
*/
|
|
987
|
+
readonly reserved?: boolean;
|
|
988
|
+
/**
|
|
989
|
+
* Controls if a public IPv4 address is associated to an instance at launch
|
|
990
|
+
*
|
|
991
|
+
* Note this is specific to IPv4 addresses.
|
|
992
|
+
*
|
|
993
|
+
* @default true in Subnet.Public of IPV4_ONLY VPCs, false otherwise
|
|
994
|
+
*/
|
|
995
|
+
readonly mapPublicIpOnLaunch?: boolean;
|
|
996
|
+
/**
|
|
997
|
+
* This property is specific to dual stack VPCs.
|
|
998
|
+
*
|
|
999
|
+
* If set to false, then an IPv6 address will not be automatically assigned.
|
|
1000
|
+
*
|
|
1001
|
+
* Note this is specific to IPv6 addresses.
|
|
1002
|
+
*
|
|
1003
|
+
* @default true
|
|
1004
|
+
*/
|
|
1005
|
+
readonly ipv6AssignAddressOnCreation?: boolean;
|
|
1006
|
+
}
|
|
1007
|
+
/**
|
|
1008
|
+
* Define an AWS Virtual Private Cloud
|
|
1009
|
+
*
|
|
1010
|
+
* See the package-level documentation of this package for an overview
|
|
1011
|
+
* of the various dimensions in which you can configure your VPC.
|
|
1012
|
+
*
|
|
1013
|
+
* For example:
|
|
1014
|
+
*
|
|
1015
|
+
* ```ts
|
|
1016
|
+
* const vpc = new compute.Vpc(this, 'TheVPC', {
|
|
1017
|
+
* ipAddresses: compute.IpAddresses.cidr('10.0.0.0/16'),
|
|
1018
|
+
* })
|
|
1019
|
+
*
|
|
1020
|
+
* // Iterate the private subnets
|
|
1021
|
+
* const selection = vpc.selectSubnets({
|
|
1022
|
+
* subnetType: compute.SubnetType.PRIVATE_WITH_EGRESS
|
|
1023
|
+
* });
|
|
1024
|
+
*
|
|
1025
|
+
* for (const subnet of selection.subnets) {
|
|
1026
|
+
* // ...
|
|
1027
|
+
* }
|
|
1028
|
+
* ```
|
|
1029
|
+
*
|
|
1030
|
+
* @resource aws_vpc
|
|
1031
|
+
*/
|
|
1032
|
+
export declare class Vpc extends VpcBase {
|
|
1033
|
+
/**
|
|
1034
|
+
* The default CIDR range used when creating VPCs.
|
|
1035
|
+
* This can be overridden using VpcProps when creating a VPCNetwork resource.
|
|
1036
|
+
* e.g. new Vpc(this, { cidr: '192.168.0.0./16' })
|
|
1037
|
+
*
|
|
1038
|
+
* Note this is specific to the IPv4 CIDR.
|
|
1039
|
+
*/
|
|
1040
|
+
static readonly DEFAULT_CIDR_RANGE: string;
|
|
1041
|
+
/**
|
|
1042
|
+
* The default subnet configuration
|
|
1043
|
+
*
|
|
1044
|
+
* 1 Public and 1 Private subnet per AZ evenly split
|
|
1045
|
+
*/
|
|
1046
|
+
static readonly DEFAULT_SUBNETS: SubnetConfiguration[];
|
|
1047
|
+
/**
|
|
1048
|
+
* The default subnet configuration if natGateways specified to be 0
|
|
1049
|
+
*
|
|
1050
|
+
* 1 Public and 1 Isolated Subnet per AZ evenly split
|
|
1051
|
+
*/
|
|
1052
|
+
static readonly DEFAULT_SUBNETS_NO_NAT: SubnetConfiguration[];
|
|
1053
|
+
/**
|
|
1054
|
+
* Import a VPC by supplying all attributes directly
|
|
1055
|
+
*
|
|
1056
|
+
* NOTE: using `fromVpcAttributes()` with deploy-time parameters (like a `TerraformVariable`
|
|
1057
|
+
* to represent a list of subnet IDs) sometimes accidentally works. It happens to work for
|
|
1058
|
+
* constructs that need a list of subnets (like `AutoScalingGroup` and `eks.Cluster`)
|
|
1059
|
+
* but it does not work for constructs that need individual subnets (like`Instance`).
|
|
1060
|
+
* See https://github.com/aws/aws-cdk/issues/4118 for more information.
|
|
1061
|
+
*/
|
|
1062
|
+
static fromVpcAttributes(scope: Construct, id: string, attrs: VpcAttributes): IVpc;
|
|
1063
|
+
/**
|
|
1064
|
+
* Identifier for this VPC
|
|
1065
|
+
*/
|
|
1066
|
+
readonly vpcId: string;
|
|
1067
|
+
/**
|
|
1068
|
+
* @attribute
|
|
1069
|
+
*/
|
|
1070
|
+
readonly vpcArn: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* @attribute
|
|
1073
|
+
*/
|
|
1074
|
+
readonly vpcCidrBlock: string;
|
|
1075
|
+
/**
|
|
1076
|
+
* @attribute
|
|
1077
|
+
*/
|
|
1078
|
+
readonly vpcDefaultNetworkAcl: string;
|
|
1079
|
+
/**
|
|
1080
|
+
* @attribute
|
|
1081
|
+
*/
|
|
1082
|
+
readonly vpcDefaultSecurityGroup: string;
|
|
1083
|
+
/**
|
|
1084
|
+
* @attribute
|
|
1085
|
+
*/
|
|
1086
|
+
readonly vpcIpv6CidrBlock: string;
|
|
1087
|
+
/**
|
|
1088
|
+
* List of public subnets in this VPC
|
|
1089
|
+
*/
|
|
1090
|
+
readonly publicSubnets: ISubnet[];
|
|
1091
|
+
/**
|
|
1092
|
+
* List of private subnets in this VPC
|
|
1093
|
+
*/
|
|
1094
|
+
readonly privateSubnets: ISubnet[];
|
|
1095
|
+
/**
|
|
1096
|
+
* List of isolated subnets in this VPC
|
|
1097
|
+
*/
|
|
1098
|
+
readonly isolatedSubnets: ISubnet[];
|
|
1099
|
+
/**
|
|
1100
|
+
* AZs for this VPC
|
|
1101
|
+
*/
|
|
1102
|
+
readonly availabilityZones: string[];
|
|
1103
|
+
/**
|
|
1104
|
+
* Internet Gateway for the VPC. Note that in case the VPC is configured only
|
|
1105
|
+
* with ISOLATED subnets, this attribute will be `undefined`.
|
|
1106
|
+
*/
|
|
1107
|
+
readonly internetGatewayId?: string;
|
|
1108
|
+
readonly internetConnectivityEstablished: IDependable;
|
|
1109
|
+
/**
|
|
1110
|
+
* Indicates if instances launched in this VPC will have public DNS hostnames.
|
|
1111
|
+
*/
|
|
1112
|
+
readonly dnsHostnamesEnabled: boolean;
|
|
1113
|
+
/**
|
|
1114
|
+
* Indicates if DNS support is enabled for this VPC.
|
|
1115
|
+
*/
|
|
1116
|
+
readonly dnsSupportEnabled: boolean;
|
|
1117
|
+
/**
|
|
1118
|
+
* The VPC resource
|
|
1119
|
+
*/
|
|
1120
|
+
private readonly resource;
|
|
1121
|
+
/**
|
|
1122
|
+
* Indicates if IPv4 addresses will be used in the VPC.
|
|
1123
|
+
*
|
|
1124
|
+
* True for IPV4_ONLY and DUAL_STACK VPCs.
|
|
1125
|
+
*/
|
|
1126
|
+
private readonly useIpv4;
|
|
1127
|
+
/**
|
|
1128
|
+
* Indicates if IPv6 addresses will be used in the VPC.
|
|
1129
|
+
*
|
|
1130
|
+
* True for DUAL_STACK VPCs. False for IPV4_ONLY VPCs.
|
|
1131
|
+
*/
|
|
1132
|
+
private readonly useIpv6;
|
|
1133
|
+
/**
|
|
1134
|
+
* The provider of ipv4 addresses
|
|
1135
|
+
*/
|
|
1136
|
+
private readonly ipAddresses;
|
|
1137
|
+
/**
|
|
1138
|
+
* The provider of IPv6 addresses.
|
|
1139
|
+
*/
|
|
1140
|
+
private readonly ipv6Addresses?;
|
|
1141
|
+
/**
|
|
1142
|
+
* The IPv6 CIDR block CFN resource.
|
|
1143
|
+
*
|
|
1144
|
+
* Needed to create a dependency for the subnets.
|
|
1145
|
+
*/
|
|
1146
|
+
private readonly ipv6CidrBlock?;
|
|
1147
|
+
/**
|
|
1148
|
+
* The IPv6 CIDR block string representation.
|
|
1149
|
+
*/
|
|
1150
|
+
private readonly ipv6SelectedCidr?;
|
|
1151
|
+
/**
|
|
1152
|
+
* Subnet configurations for this VPC
|
|
1153
|
+
*/
|
|
1154
|
+
private subnetConfiguration;
|
|
1155
|
+
private readonly _internetConnectivityEstablished;
|
|
1156
|
+
/**
|
|
1157
|
+
* Vpc creates a VPC that spans a whole region.
|
|
1158
|
+
* It will automatically divide the provided VPC CIDR range, and create public and private subnets per Availability Zone.
|
|
1159
|
+
* Network routing for the public subnets will be configured to allow outbound access directly via an Internet Gateway.
|
|
1160
|
+
* Network routing for the private subnets will be configured to allow outbound access via a set of resilient NAT Gateways (one per AZ).
|
|
1161
|
+
*/
|
|
1162
|
+
constructor(scope: Construct, id: string, props?: VpcProps);
|
|
1163
|
+
/**
|
|
1164
|
+
* Adds a new S3 gateway endpoint to this VPC
|
|
1165
|
+
*
|
|
1166
|
+
* @deprecated use `addGatewayEndpoint()` instead
|
|
1167
|
+
*/
|
|
1168
|
+
addS3Endpoint(id: string, subnets?: SubnetSelection[]): GatewayVpcEndpoint;
|
|
1169
|
+
/**
|
|
1170
|
+
* Adds a new DynamoDB gateway endpoint to this VPC
|
|
1171
|
+
*
|
|
1172
|
+
* @deprecated use `addGatewayEndpoint()` instead
|
|
1173
|
+
*/
|
|
1174
|
+
addDynamoDbEndpoint(id: string, subnets?: SubnetSelection[]): GatewayVpcEndpoint;
|
|
1175
|
+
private createNatGateways;
|
|
1176
|
+
/**
|
|
1177
|
+
* createSubnets creates the subnets specified by the subnet configuration
|
|
1178
|
+
* array or creates the `DEFAULT_SUBNETS` configuration
|
|
1179
|
+
*/
|
|
1180
|
+
private createSubnets;
|
|
1181
|
+
/**
|
|
1182
|
+
* Defaults to true in Subnet.Public for IPV4_ONLY VPCs.
|
|
1183
|
+
*
|
|
1184
|
+
* Defaults to false in Subnet.Public for DUAL_STACK VPCs.
|
|
1185
|
+
*
|
|
1186
|
+
* Always defaults to false in non-public subnets and will error if set.
|
|
1187
|
+
*/
|
|
1188
|
+
private calculateMapPublicIpOnLaunch;
|
|
1189
|
+
private createSubnetResources;
|
|
1190
|
+
}
|
|
1191
|
+
/**
|
|
1192
|
+
* Specify configuration parameters for a VPC subnet
|
|
1193
|
+
*/
|
|
1194
|
+
export interface SubnetProps {
|
|
1195
|
+
/**
|
|
1196
|
+
* The availability zone for the subnet
|
|
1197
|
+
*/
|
|
1198
|
+
readonly availabilityZone: string;
|
|
1199
|
+
/**
|
|
1200
|
+
* The VPC which this subnet is part of
|
|
1201
|
+
*/
|
|
1202
|
+
readonly vpcId: string;
|
|
1203
|
+
/**
|
|
1204
|
+
* The CIDR notation for this subnet
|
|
1205
|
+
*/
|
|
1206
|
+
readonly cidrBlock: string;
|
|
1207
|
+
/**
|
|
1208
|
+
* Controls if a public IP is associated to an instance at launch
|
|
1209
|
+
*
|
|
1210
|
+
* @default true in Subnet.Public, false in Subnet.Private or Subnet.Isolated.
|
|
1211
|
+
*/
|
|
1212
|
+
readonly mapPublicIpOnLaunch?: boolean;
|
|
1213
|
+
/**
|
|
1214
|
+
* The IPv6 CIDR block.
|
|
1215
|
+
*
|
|
1216
|
+
* If you specify AssignIpv6AddressOnCreation, you must also specify Ipv6CidrBlock.
|
|
1217
|
+
*
|
|
1218
|
+
* @default - no IPv6 CIDR block.
|
|
1219
|
+
*/
|
|
1220
|
+
readonly ipv6CidrBlock?: string;
|
|
1221
|
+
/**
|
|
1222
|
+
* Indicates whether a network interface created in this subnet receives an IPv6 address.
|
|
1223
|
+
*
|
|
1224
|
+
* If you specify AssignIpv6AddressOnCreation, you must also specify Ipv6CidrBlock.
|
|
1225
|
+
*
|
|
1226
|
+
* @default false
|
|
1227
|
+
*/
|
|
1228
|
+
readonly assignIpv6AddressOnCreation?: boolean;
|
|
1229
|
+
}
|
|
1230
|
+
/**
|
|
1231
|
+
* Represents a new VPC subnet resource
|
|
1232
|
+
*
|
|
1233
|
+
* @resource aws_subnet
|
|
1234
|
+
*/
|
|
1235
|
+
export declare class Subnet extends AwsConstructBase implements ISubnet {
|
|
1236
|
+
static isVpcSubnet(x: any): x is Subnet;
|
|
1237
|
+
static fromSubnetAttributes(scope: Construct, id: string, attrs: SubnetAttributes): ISubnet;
|
|
1238
|
+
/**
|
|
1239
|
+
* Import existing subnet from id.
|
|
1240
|
+
*/
|
|
1241
|
+
static fromSubnetId(scope: Construct, id: string, subnetId: string): ISubnet;
|
|
1242
|
+
readonly subnetOutputs: SubnetOutputs;
|
|
1243
|
+
get outputs(): Record<string, any>;
|
|
1244
|
+
/**
|
|
1245
|
+
* The Availability Zone the subnet is located in
|
|
1246
|
+
*/
|
|
1247
|
+
readonly availabilityZone: string;
|
|
1248
|
+
/**
|
|
1249
|
+
* @attribute
|
|
1250
|
+
*/
|
|
1251
|
+
readonly ipv4CidrBlock: string;
|
|
1252
|
+
/**
|
|
1253
|
+
* The subnetId for this particular subnet
|
|
1254
|
+
*/
|
|
1255
|
+
readonly subnetId: string;
|
|
1256
|
+
/**
|
|
1257
|
+
* @attribute
|
|
1258
|
+
*/
|
|
1259
|
+
readonly subnetVpcId: string;
|
|
1260
|
+
/**
|
|
1261
|
+
* @attribute
|
|
1262
|
+
*/
|
|
1263
|
+
readonly subnetAvailabilityZone: string;
|
|
1264
|
+
/**
|
|
1265
|
+
* @attribute
|
|
1266
|
+
*/
|
|
1267
|
+
readonly subnetIpv6CidrBlock: string;
|
|
1268
|
+
/**
|
|
1269
|
+
* The Amazon Resource Name (ARN) of the Outpost for this subnet (if one exists).
|
|
1270
|
+
* @attribute
|
|
1271
|
+
*/
|
|
1272
|
+
readonly subnetOutpostArn: string;
|
|
1273
|
+
/**
|
|
1274
|
+
* @attribute
|
|
1275
|
+
*/
|
|
1276
|
+
readonly subnetNetworkAclAssociationId: string | undefined;
|
|
1277
|
+
/**
|
|
1278
|
+
* Parts of this VPC subnet
|
|
1279
|
+
*/
|
|
1280
|
+
readonly dependencyElements: IDependable[];
|
|
1281
|
+
/**
|
|
1282
|
+
* The routeTableId attached to this subnet.
|
|
1283
|
+
*/
|
|
1284
|
+
readonly routeTable: IRouteTable;
|
|
1285
|
+
readonly internetConnectivityEstablished: IDependable;
|
|
1286
|
+
private readonly _internetConnectivityEstablished;
|
|
1287
|
+
private _networkAcl?;
|
|
1288
|
+
resource: subnet.Subnet;
|
|
1289
|
+
constructor(scope: Construct, id: string, props: SubnetProps);
|
|
1290
|
+
/**
|
|
1291
|
+
* Create a default route that points to a passed IGW, with a dependency
|
|
1292
|
+
* on the IGW's attachment to the VPC.
|
|
1293
|
+
*
|
|
1294
|
+
* @param gatewayId the logical ID (ref) of the gateway attached to your VPC
|
|
1295
|
+
* @param gatewayAttachment the gateway attachment construct to be added as a dependency
|
|
1296
|
+
*/
|
|
1297
|
+
addDefaultInternetRoute(gatewayId: string, gatewayAttachment: IDependable): void;
|
|
1298
|
+
/**
|
|
1299
|
+
* Create a default IPv6 route that points to a passed IGW.
|
|
1300
|
+
*
|
|
1301
|
+
* @param gatewayId the logical ID (ref) of the gateway attached to your VPC
|
|
1302
|
+
*/
|
|
1303
|
+
addIpv6DefaultInternetRoute(gatewayId: string): void;
|
|
1304
|
+
/**
|
|
1305
|
+
* Create a default IPv6 route that points to a passed EIGW.
|
|
1306
|
+
*
|
|
1307
|
+
* @param gatewayId the logical ID (ref) of the gateway attached to your VPC
|
|
1308
|
+
*/
|
|
1309
|
+
addIpv6DefaultEgressOnlyInternetRoute(gatewayId: string): void;
|
|
1310
|
+
/**
|
|
1311
|
+
* Network ACL associated with this Subnet
|
|
1312
|
+
*
|
|
1313
|
+
* Upon creation, this is undefined pointing to
|
|
1314
|
+
* the default ACL which allows all traffic, except
|
|
1315
|
+
* explicit DENY entries that you add.
|
|
1316
|
+
*
|
|
1317
|
+
* You can replace it with a custom ACL which denies all traffic except
|
|
1318
|
+
* the explicit ALLOW entries that you add by creating a `NetworkAcl`
|
|
1319
|
+
* object and calling `associateNetworkAcl()`.
|
|
1320
|
+
*/
|
|
1321
|
+
get networkAcl(): INetworkAcl | undefined;
|
|
1322
|
+
/**
|
|
1323
|
+
* Adds an entry to this subnets route table that points to the passed NATGatewayId
|
|
1324
|
+
* @param natGatewayId The ID of the NAT gateway
|
|
1325
|
+
*/
|
|
1326
|
+
addDefaultNatRoute(natGatewayId: string): void;
|
|
1327
|
+
/**
|
|
1328
|
+
* Adds an entry to this subnets route table that points to the passed NATGatewayId.
|
|
1329
|
+
* Uses the known 64:ff9b::/96 prefix.
|
|
1330
|
+
* @param natGatewayId The ID of the NAT gateway
|
|
1331
|
+
*/
|
|
1332
|
+
addIpv6Nat64Route(natGatewayId: string): void;
|
|
1333
|
+
/**
|
|
1334
|
+
* Adds an entry to this subnets route table
|
|
1335
|
+
*/
|
|
1336
|
+
addRoute(id: string, options: AddRouteOptions): void;
|
|
1337
|
+
associateNetworkAcl(id: string, networkAcl: INetworkAcl): void;
|
|
1338
|
+
}
|
|
1339
|
+
/**
|
|
1340
|
+
* Options for adding a new route to a subnet
|
|
1341
|
+
*/
|
|
1342
|
+
export interface AddRouteOptions {
|
|
1343
|
+
/**
|
|
1344
|
+
* IPv4 range this route applies to
|
|
1345
|
+
*
|
|
1346
|
+
* @default '0.0.0.0/0'
|
|
1347
|
+
*/
|
|
1348
|
+
readonly destinationCidrBlock?: string;
|
|
1349
|
+
/**
|
|
1350
|
+
* IPv6 range this route applies to
|
|
1351
|
+
*
|
|
1352
|
+
* @default - Uses IPv6
|
|
1353
|
+
*/
|
|
1354
|
+
readonly destinationIpv6CidrBlock?: string;
|
|
1355
|
+
/**
|
|
1356
|
+
* What type of router to route this traffic to
|
|
1357
|
+
*/
|
|
1358
|
+
readonly routerType: RouterType;
|
|
1359
|
+
/**
|
|
1360
|
+
* The ID of the router
|
|
1361
|
+
*
|
|
1362
|
+
* Can be an instance ID, gateway ID, etc, depending on the router type.
|
|
1363
|
+
*/
|
|
1364
|
+
readonly routerId: string;
|
|
1365
|
+
/**
|
|
1366
|
+
* Whether this route will enable internet connectivity
|
|
1367
|
+
*
|
|
1368
|
+
* If true, this route will be added before any AWS resources that depend
|
|
1369
|
+
* on internet connectivity in the VPC will be created.
|
|
1370
|
+
*
|
|
1371
|
+
* @default false
|
|
1372
|
+
*/
|
|
1373
|
+
readonly enablesInternetConnectivity?: boolean;
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Type of router used in route
|
|
1377
|
+
*/
|
|
1378
|
+
export declare enum RouterType {
|
|
1379
|
+
/**
|
|
1380
|
+
* Carrier gateway
|
|
1381
|
+
*/
|
|
1382
|
+
CARRIER_GATEWAY = "CarrierGateway",
|
|
1383
|
+
/**
|
|
1384
|
+
* Egress-only Internet Gateway
|
|
1385
|
+
*/
|
|
1386
|
+
EGRESS_ONLY_INTERNET_GATEWAY = "EgressOnlyInternetGateway",
|
|
1387
|
+
/**
|
|
1388
|
+
* Internet Gateway
|
|
1389
|
+
*/
|
|
1390
|
+
GATEWAY = "Gateway",
|
|
1391
|
+
/**
|
|
1392
|
+
* Local Gateway
|
|
1393
|
+
*/
|
|
1394
|
+
LOCAL_GATEWAY = "LocalGateway",
|
|
1395
|
+
/**
|
|
1396
|
+
* NAT Gateway
|
|
1397
|
+
*/
|
|
1398
|
+
NAT_GATEWAY = "NatGateway",
|
|
1399
|
+
/**
|
|
1400
|
+
* Network Interface
|
|
1401
|
+
*/
|
|
1402
|
+
NETWORK_INTERFACE = "NetworkInterface",
|
|
1403
|
+
/**
|
|
1404
|
+
* Transit Gateway
|
|
1405
|
+
*/
|
|
1406
|
+
TRANSIT_GATEWAY = "TransitGateway",
|
|
1407
|
+
/**
|
|
1408
|
+
* VPC peering connection
|
|
1409
|
+
*/
|
|
1410
|
+
VPC_PEERING_CONNECTION = "VpcPeeringConnection",
|
|
1411
|
+
/**
|
|
1412
|
+
* VPC Endpoint for gateway load balancers
|
|
1413
|
+
*/
|
|
1414
|
+
VPC_ENDPOINT = "VpcEndpoint"
|
|
1415
|
+
}
|
|
1416
|
+
export interface PublicSubnetProps extends SubnetProps {
|
|
1417
|
+
}
|
|
1418
|
+
export interface IPublicSubnet extends ISubnet {
|
|
1419
|
+
}
|
|
1420
|
+
export interface PublicSubnetAttributes extends SubnetAttributes {
|
|
1421
|
+
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Represents a public VPC subnet resource
|
|
1424
|
+
*/
|
|
1425
|
+
export declare class PublicSubnet extends Subnet implements IPublicSubnet {
|
|
1426
|
+
static fromPublicSubnetAttributes(scope: Construct, id: string, attrs: PublicSubnetAttributes): IPublicSubnet;
|
|
1427
|
+
constructor(scope: Construct, id: string, props: PublicSubnetProps);
|
|
1428
|
+
/**
|
|
1429
|
+
* Creates a new managed NAT gateway attached to this public subnet.
|
|
1430
|
+
* Also adds the EIP for the managed NAT.
|
|
1431
|
+
* @returns A ref to the the NAT Gateway ID
|
|
1432
|
+
*/
|
|
1433
|
+
addNatGateway(eipAllocationId?: string): natGateway.NatGateway;
|
|
1434
|
+
}
|
|
1435
|
+
export interface PrivateSubnetProps extends SubnetProps {
|
|
1436
|
+
}
|
|
1437
|
+
export interface IPrivateSubnet extends ISubnet {
|
|
1438
|
+
}
|
|
1439
|
+
export interface PrivateSubnetAttributes extends SubnetAttributes {
|
|
1440
|
+
}
|
|
1441
|
+
/**
|
|
1442
|
+
* Represents a private VPC subnet resource
|
|
1443
|
+
*/
|
|
1444
|
+
export declare class PrivateSubnet extends Subnet implements IPrivateSubnet {
|
|
1445
|
+
static fromPrivateSubnetAttributes(scope: Construct, id: string, attrs: PrivateSubnetAttributes): IPrivateSubnet;
|
|
1446
|
+
constructor(scope: Construct, id: string, props: PrivateSubnetProps);
|
|
1447
|
+
}
|
|
1448
|
+
export {};
|