Review the template configuration for Alibaba Cloud ROS stacks

Specify the ROS template that defines the resources to deploy.

Description

To create a ROS stack, supply a template that defines its resources. A stack policy controls which changes an update may make.

Potential impact

A missing template or missing resource definitions can leave the required infrastructure undeployed.

Remediation

Set template_body or template_url to a reviewed template. Validate its resources and parameters, track template changes and retain the stack policy your deployment needs.

Examples

Before

hcl
resource "alicloud_ros_stack" "example" {
  stack_name = "tf-testaccstack"

  stack_policy_body = <<EOF
{
  "Statement": [{
    "Action": "Update:Delete",
    "Resource": "*",
    "Effect": "Allow",
    "Principal": "*"
  }]
}
EOF
}

After

hcl
resource "alicloud_ros_stack" "example" {
  stack_name    = "tf-testaccstack"
  template_body = <<EOF
{
  "ROSTemplateFormatVersion": "2015-09-01"
}
EOF
}

The first excerpt supplies only a policy allowing deletion during updates. The second drops the policy and adds a template containing only its format version. Add the resource definitions and any required update protection.

References