[英]Cloudformation Custom Resources
I would like to create a custom resource in cloudformation that will contain sub resources so that I can prevision application resources for high value clients. 我想在cloudformation中创建一个包含子资源的自定义资源,以便为高价值客户预配置应用程序资源。
For example. 例如。 I have an application that has an SNS::Subscription
, SQS::Queue
, ElasticBeanstalk::Environment
, ElasticBeanstalk::Application
and ElasticBeanstalk::ApplicationVersion
. 我有一个具有SNS::Subscription
, SQS::Queue
, ElasticBeanstalk::Environment
, ElasticBeanstalk::Application
和ElasticBeanstalk::ApplicationVersion
。
Copying this for any client I want to provision dedicated resources for is a hassle. 将其复制到任何我要为其提供专用资源的客户端上都是很麻烦的。 Keeping them all up to date is a problem. 使它们保持最新是一个问题。
I would like to define these once, and use a custom resource to generate them with custom variables provided. 我想一次定义它们,并使用自定义资源通过提供的自定义变量生成它们。 Like- 喜欢-
GeneralPurpose:
Type: COM::MyApplication
Properties:
QueueName: general
InstanceType: t3.micro
Instances: 30
AcmeClient:
Type: COM::MyApplication
Properties:
QueueName: acme
InstanceType: t5.medium
Instances: 10
SnsFilterValue: acme
These custom properties would be used in the custom resource template I defined and generate all the resources required for both the general
and acme
application. 这些自定义属性将在我定义的自定义资源模板中使用,并生成general
和acme
应用程序所需的所有资源。
If I need to change the default visibility timeout for the application queue, I can do it in one place and update all resources that used this custom resource. 如果需要更改应用程序队列的默认可见性超时,则可以在一个地方进行更改,并更新使用此自定义资源的所有资源。
Is this possible? 这可能吗?
Consider using a nested stacks instead of a custom resource. 考虑使用嵌套堆栈而不是自定义资源。 You can define parameterized templates to use as the nested stacks. 您可以定义参数化的模板以用作嵌套堆栈。 This will be much easier to maintain. 这将更容易维护。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.