GCP

You want to create €?fully baked €?or €?golden €?Compute Engine images for your application. You need to bootstrap your application to connect to the appropriate database according to the environment the application is running on (test, staging, production). What should you do?

发布于 2021-02-20 23:51:06
【单选题】
A Embed the appropriate database connection string in the image. Create a different image for each environment.
B When creating the Compute Engine instance, add a tag with the name of the database to be connected. In your application, quer y the Compute Engine API to pull the tags for the current instance, and use the tag to construct the appropriate database connection string
C When creating the Compute Engine instance, create a metadata item with a key of €?DATABASE €?and a value for the appropriate database connection string. In your application, read the €?DATABASE €?environment variable, and use the value to connect to the appropriate database.
D When creating the Compute Engine instance, create a metadata item with a key of €?DATABASE €?and a value for the appropriate database connection string. In your application, query the metadata server for the €?DATABASE €?value, and use the value to connect to the appropriate database.

查看更多

关注者
0
被浏览
101
  • 体验AI问答!更聪明、超智能!
  • 一款基于GPT的超级AI助手,可以对话、创作、写文案!
1 个回答

撰写答案

请登录后再发布答案,点击登录

发布
问题

手机
浏览

扫码手机浏览

分享
好友

在线
客服