stack_deploy¶
-
troposphere_mate.core.stack_deploy.
upload_template
(s3_client, template_content, bucket_name, prefix='cloudformation/upload')[source]¶ Upload cloudformation template to s3 bucket and returns template url. It is a format like this https://s3.amazonaws.com/<s3-bucket-name>/<s3-key>
Return type: str
-
troposphere_mate.core.stack_deploy.
package
(s3_client, template, bucket_name, prefix='cloudformation/upload', verbose=False, _is_master=True)[source]¶ Package cloudformation template. If it includes nested template, then it also converts relative path in TemplateUrl field into s3 uri.
The nested template packaging feature requires assign
troposphere_mate.Template
totroposphere_mate.cloudformation.Stack._template
attribute. You could use thelink_stack_template(stack, template)()
Return type: str 中文文档
按照 Nested Stack 的顺序, 将所有的 Template 上传到 S3, 并用 S3 Url 替换
cloudformation.Stack.TemplateUrl
属性. 最终返回 Master Template 的 S3 Url.
-
troposphere_mate.core.stack_deploy.
link_stack_template
(stack, template)[source]¶ Link
troposphere_mate.cloudformation.Stack
withtroposphere_mate.Template
, to indicate that the cloudformation template represent the nested stack.Return type: None 中文文档
将 Nested Stack 和 Nested Stack 显式地联系起来. 使得 package 方法能够和 awscli 中的一样, 能将 Nested Stack 中 TemplateUrl 所指定的 Template 联合打包上传.
-
troposphere_mate.core.stack_deploy.
deploy_stack
(cf_client, stack_name, template_url, stack_tags=None, stack_parameters=None, execution_role_arn=None, include_iam=False)[source]¶ Deploy cloudformation template from s3.
Return type: dict 中文文档
部署 Cloudformation Template. 自动决定是 Create 还是 Update.