[英]Attaching certificate to ALB with CloudFormation
我有 AWS Fargate 的堆棧定義。 除其他外,我的堆棧有一個負載平衡器和一個用於外部訪問的公共 IP/DNS。 我使用 Route53 手動制作了證書,目前將其附加為:
Parameters:
VPC:
Type: AWS::EC2::VPC::Id
SubnetA:
Type: AWS::EC2::Subnet::Id
SubnetB:
Type: AWS::EC2::Subnet::Id
Certificate:
Type: String
# Update with the certificate ARN from Certificate Manager, which must exist in the same region.
# In our case, it is staging-api.mydomain.com
Default: 'arn:aws:acm:us-east-1:505xxxxx303:certificate/03df1a1e-xxxx-xxxx-xxxx-34388b5a1f67'
我寧願在創建堆棧時創建/更新 SSL 證書,而不必依賴於返回現有證書 ID 的外部進程。 事實上,我寧願取消硬編碼的 AWS 賬戶 ID 和硬編碼的證書 ID。
我可以以某種方式從 AWS 委托人獲取/繼承帳戶 ID 並自動執行證書管理嗎?
通常,您會使用AWS::AccountId變量。 但這在Parameters
中不起作用。
克服這個問題的唯一選擇是通過宏,您必須以 lambda 函數的形式開發自己。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.