从我的应用程序中引用 Elastic Beanstalk 创建的资源?
Refer to Resources Created by Elastic Beanstalk from my Application?
所以我正在开发一个使用 SQS 的 Elastic Beanstalk 应用程序。我正在尝试使用 .ebextensions
为我创建队列作为部署的一部分。
我可以很好地创建队列。但是如何让 Elastic Beanstalk/CloudFormation 将它们告诉我的应用程序呢?
作为参考,我目前 trying to pass the URLs through environment variables 但 CloudFormation 对此感到窒息。
简单的解决方案是使用 something like this:
option_settings:
aws:elasticbeanstalk:customoption:
NewSignupEmail: me@example.com
aws:elasticbeanstalk:application:environment:
THEME: "flatly"
AWS_REGION: '`{"Ref" : "AWS::Region"}`'
STARTUP_SIGNUP_TABLE: '`{"Ref" : "StartupSignupsTable"}`'
NEW_SIGNUP_TOPIC: '`{"Ref" : "NewSignupTopic"}`'
所以我正在开发一个使用 SQS 的 Elastic Beanstalk 应用程序。我正在尝试使用 .ebextensions
为我创建队列作为部署的一部分。
我可以很好地创建队列。但是如何让 Elastic Beanstalk/CloudFormation 将它们告诉我的应用程序呢?
作为参考,我目前 trying to pass the URLs through environment variables 但 CloudFormation 对此感到窒息。
简单的解决方案是使用 something like this:
option_settings:
aws:elasticbeanstalk:customoption:
NewSignupEmail: me@example.com
aws:elasticbeanstalk:application:environment:
THEME: "flatly"
AWS_REGION: '`{"Ref" : "AWS::Region"}`'
STARTUP_SIGNUP_TABLE: '`{"Ref" : "StartupSignupsTable"}`'
NEW_SIGNUP_TOPIC: '`{"Ref" : "NewSignupTopic"}`'