AWSTemplateFormatVersion: '2010-09-09'
Description: SSMエンドポイント設定と静的IPアドレスの振り方
Resources:
MyVPCEndpoint:
Type: AWS::EC2::VPCEndpoint
Properties:
VpcId: vpc-xxxxxxxx # VPCのIDを指定
ServiceName: com.amazonaws.region.ssm # リージョンを指定 (例: us-west-2)
VpcEndpointType: Interface
SubnetIds:
- subnet-xxxxxxxx # SubnetのIDを指定
- subnet-yyyyyyyy
PrivateDnsEnabled: true
SecurityGroupIds:
- sg-xxxxxxxx # セキュリティグループIDを指定
IpAddressType: ipv4 # IPアドレスの種類を指定
MyNetworkInterface:
Type: AWS::EC2::NetworkInterface
Properties:
SubnetId: subnet-xxxxxxxx # SubnetのIDを指定
PrivateIpAddress: 10.0.0.100 # 静的IPアドレスを指定
Description: 'Network Interface for SSM Endpoint'
GroupSet:
- sg-xxxxxxxx # セキュリティグループIDを指定
MyVPCEndpointNetworkInterface:
Type: AWS::EC2::VPCEndpointNetworkInterfaceAttachment
Properties:
NetworkInterfaceId: !Ref MyNetworkInterface
VpceId: !Ref MyVPCEndpoint
Outputs:
VPCEndpointId:
Description: VPC Endpoint ID
Value: !Ref MyVPCEndpoint
NetworkInterfaceId:
Description: Network Interface ID
Value: !Ref MyNetworkInterface