- AWS Administration Cookbook
- Lucas Chan Rowan Udell
- 74字
- 2021-07-09 18:18:28
Fn::Sub
Use Fn::Sub to perform string substitution. Consider this:
DSN: "Fn::Sub"
- mysql://${db_user}:${db_pass}@${db_host}:3306/wordpress
- { db_user: lchan, db_pass: ch33s3, db_host: localhost }
This would yield the following value:
mysql://lchan:ch33s3@localhost:3306/wordpress
When you combine these functions with Ref and Fn::GetAtt, you can start doing some really powerful stuff, as we'll be seeing in the recipes throughout this book.
Other available inbuilt functions include:
- Fn::Base64
- Fn::FindInMap
- Fn::GetAZs
- Fn::ImportValue
- Fn::Select
Documentation on all of these functions is available here http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html.
推薦閱讀
- 嵌入式系統(tǒng)應(yīng)用
- 21天學(xué)通PHP
- 基于LPC3250的嵌入式Linux系統(tǒng)開發(fā)
- 最簡數(shù)據(jù)挖掘
- PyTorch Deep Learning Hands-On
- 人工智能實踐錄
- 傳感器與新聞
- LAMP網(wǎng)站開發(fā)黃金組合Linux+Apache+MySQL+PHP
- Salesforce Advanced Administrator Certification Guide
- 手機游戲策劃設(shè)計
- Linux系統(tǒng)下C程序開發(fā)詳解
- 傳感器與自動檢測
- Microsoft Dynamics CRM 2013 Marketing Automation
- 玩機器人 學(xué)單片機
- Apache Spark Quick Start Guide