如何解决Cloudformation !Ref 没有为 vpc 端点返回正确的值
我创建了一个 vpc 端点:
@Database(version: 1,entities: [CinemaTable,FavouriteTable])
abstract class MovieDatabase extends FloorDatabase {
MovieDao get movieDao;
}
以及使用以下方法创建的私有 API:
ExecuteApiVPCEndpoint:
Type: AWS::EC2::VPCEndpoint
Properties:
PolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal: "*"
Action:
- "execute-api:*"
Resource:
- "*"
ServiceName: !Sub com.amazonaws.${AWS::Region}.execute-api
VpcId: !Ref MyVPC
VpcEndpointType: Interface
subnetIds:
- !Ref privatesubnet01
- !Ref privatesubnet02
SecurityGroupIds:
- !Ref EndpointSG # has to allow traffic from your VPC
PrivatednsEnabled: true
堆栈部署没有错误,但 API 资源策略中的 vpce 与正在创建的 vpce 不匹配。这里出了什么问题?谢谢!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。