Stack
Provides a ROS Stack resource. For information about ROS Stack and how to use it, see What is Stack.
NOTE: Available since v1.106.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = new alicloud.ros.Stack("example", {
stackName: "tf-testaccstack",
templateBody: ` {
\x09"ROSTemplateFormatVersion": "2015-09-01"
}
`,
stackPolicyBody: ` {
\x09"Statement": [{
\x09\x09"Action": "Update:Delete",
\x09\x09"Resource": "*",
\x09\x09"Effect": "Allow",
\x09\x09"Principal": "*"
\x09}]
}
`,
});
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.ros.Stack("example",
stack_name="tf-testaccstack",
template_body=""" {
\x09"ROSTemplateFormatVersion": "2015-09-01"
}
""",
stack_policy_body=""" {
\x09"Statement": [{
\x09\x09"Action": "Update:Delete",
\x09\x09"Resource": "*",
\x09\x09"Effect": "Allow",
\x09\x09"Principal": "*"
\x09}]
}
""")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var example = new AliCloud.Ros.Stack("example", new()
{
StackName = "tf-testaccstack",
TemplateBody = @" {
""ROSTemplateFormatVersion"": ""2015-09-01""
}
",
StackPolicyBody = @" {
""Statement"": [{
""Action"": ""Update:Delete"",
""Resource"": ""*"",
""Effect"": ""Allow"",
""Principal"": ""*""
}]
}
",
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ros"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ros.NewStack(ctx, "example", &ros.StackArgs{
StackName: pulumi.String("tf-testaccstack"),
TemplateBody: pulumi.String(" {\n \"ROSTemplateFormatVersion\": \"2015-09-01\"\n }\n"),
StackPolicyBody: pulumi.String(` {
"Statement": [{
"Action": "Update:Delete",
"Resource": "*",
"Effect": "Allow",
"Principal": "*"
}]
}
`),
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ros.Stack;
import com.pulumi.alicloud.ros.StackArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new Stack("example", StackArgs.builder()
.stackName("tf-testaccstack")
.templateBody("""
{
"ROSTemplateFormatVersion": "2015-09-01"
}
""")
.stackPolicyBody("""
{
"Statement": [{
"Action": "Update:Delete",
"Resource": "*",
"Effect": "Allow",
"Principal": "*"
}]
}
""")
.build());
}
}
resources:
example:
type: alicloud:ros:Stack
properties:
stackName: tf-testaccstack
templateBody: |2
{
"ROSTemplateFormatVersion": "2015-09-01"
}
stackPolicyBody: |2
{
"Statement": [{
"Action": "Update:Delete",
"Resource": "*",
"Effect": "Allow",
"Principal": "*"
}]
}
Import
ROS Stack can be imported using the id, e.g.
$ pulumi import alicloud:ros/stack:Stack example <stack_id>
Properties
Specifies whether to delete the stack after it is created.
Specifies whether to enable deletion protection on the stack. Valid values: Disabled
, Enabled
. Default to: Disabled
Specifies whether to disable rollback on stack creation failure. Default to: false
.
The callback URL for receiving stack event N. Only HTTP POST is supported. Maximum value of N: 5.
The parameters. If the parameter name and value are not specified, ROS will use the default value specified in the template.
The name of the RAM role. ROS assumes the specified RAM role to create the stack and call API operations by using the credentials of the role.
Specifies whether to enable replacement update after a resource attribute that does not support modification update is changed. Modification update keeps the physical ID of the resource unchanged. However, the resource is deleted and then recreated, and its physical ID is changed if replacement update is enabled.
The retain all resources.
Specifies whether to retain the resources in the stack.
The structure that contains the stack policy body. The stack policy body must be 1 to 16,384 bytes in length.
The structure that contains the body of the temporary overriding stack policy. The stack policy body must be 1 to 16,384 bytes in length.
The URL of the file that contains the temporary overriding stack policy. The URL must point to a policy located in an HTTP or HTTPS web server or an Alibaba Cloud OSS bucket. Examples: oss://ros/stack-policy/demo and oss://ros/stack-policy/demo?RegionId=cn-hangzhou. The policy can be up to 16,384 bytes in length and the URL can be up to 1,350 bytes in length. If the region of the OSS bucket is not specified, the RegionId value is used by default.
The URL of the file that contains the stack policy. The URL must point to a policy located in an HTTP or HTTPS web server or an Alibaba Cloud OSS bucket. Examples: oss://ros/stack-policy/demo and oss://ros/stack-policy/demo?RegionId=cn-hangzhou. The policy can be up to 16,384 bytes in length and the URL can be up to 1,350 bytes in length. If the region of the OSS bucket is not specified, the RegionId value is used by default.
The structure that contains the template body. The template body must be 1 to 524,288 bytes in length. If the length of the template body is longer than required, we recommend that you add parameters to the HTTP POST request body to avoid request failures due to excessive length of URLs.
The URL of the file that contains the template body. The URL must point to a template located in an HTTP or HTTPS web server or an Alibaba Cloud OSS bucket. Examples: oss://ros/template/demo and oss://ros/template/demo?RegionId=cn-hangzhou. The template must be 1 to 524,288 bytes in length. If the region of the OSS bucket is not specified, the RegionId value is used by default.
The version of the template.
The timeout period that is specified for the stack creation request. Default to: 60
.
Specifies whether to use the values that were passed last time for the parameters that you do not specify in the current request.