Stack

class Stack : KotlinCustomResource

Provides an OpsWorks stack resource. !>ALERT: AWS no longer supports OpsWorks Stacks. All related resources will be removed from the AWS Provider in the next major version.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const main = new aws.opsworks.Stack("main", {
name: "awesome-stack",
region: "us-west-1",
serviceRoleArn: opsworksAwsIamRole.arn,
defaultInstanceProfileArn: opsworks.arn,
tags: {
Name: "foobar-stack",
},
customJson: `{
"foobar": {
"version": "1.0.0"
}
}
`,
});
import pulumi
import pulumi_aws as aws
main = aws.opsworks.Stack("main",
name="awesome-stack",
region="us-west-1",
service_role_arn=opsworks_aws_iam_role["arn"],
default_instance_profile_arn=opsworks["arn"],
tags={
"Name": "foobar-stack",
},
custom_json="""{
"foobar": {
"version": "1.0.0"
}
}
""")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var main = new Aws.OpsWorks.Stack("main", new()
{
Name = "awesome-stack",
Region = "us-west-1",
ServiceRoleArn = opsworksAwsIamRole.Arn,
DefaultInstanceProfileArn = opsworks.Arn,
Tags =
{
{ "Name", "foobar-stack" },
},
CustomJson = @"{
""foobar"": {
""version"": ""1.0.0""
}
}
",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opsworks"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := opsworks.NewStack(ctx, "main", &opsworks.StackArgs{
Name: pulumi.String("awesome-stack"),
Region: pulumi.String("us-west-1"),
ServiceRoleArn: pulumi.Any(opsworksAwsIamRole.Arn),
DefaultInstanceProfileArn: pulumi.Any(opsworks.Arn),
Tags: pulumi.StringMap{
"Name": pulumi.String("foobar-stack"),
},
CustomJson: pulumi.String("{\n \"foobar\": {\n \"version\": \"1.0.0\"\n }\n}\n"),
})
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.aws.opsworks.Stack;
import com.pulumi.aws.opsworks.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 main = new Stack("main", StackArgs.builder()
.name("awesome-stack")
.region("us-west-1")
.serviceRoleArn(opsworksAwsIamRole.arn())
.defaultInstanceProfileArn(opsworks.arn())
.tags(Map.of("Name", "foobar-stack"))
.customJson("""
{
"foobar": {
"version": "1.0.0"
}
}
""")
.build());
}
}
resources:
main:
type: aws:opsworks:Stack
properties:
name: awesome-stack
region: us-west-1
serviceRoleArn: ${opsworksAwsIamRole.arn}
defaultInstanceProfileArn: ${opsworks.arn}
tags:
Name: foobar-stack
customJson: |
{
"foobar": {
"version": "1.0.0"
}
}

Import

Using pulumi import, import OpsWorks stacks using the id. For example:

$ pulumi import aws:opsworks/stack:Stack bar 00000000-0000-0000-0000-000000000000

Properties

Link copied to clipboard
val agentVersion: Output<String>

If set to "LATEST", OpsWorks will automatically install the latest version.

Link copied to clipboard
val arn: Output<String>
Link copied to clipboard
val berkshelfVersion: Output<String>?

If manage_berkshelf is enabled, the version of Berkshelf to use.

Link copied to clipboard
val color: Output<String>?

Color to paint next to the stack's resources in the OpsWorks console.

Link copied to clipboard

Name of the configuration manager to use. Defaults to "Chef".

Link copied to clipboard

Version of the configuration manager to use. Defaults to "11.4".

Link copied to clipboard

When use_custom_cookbooks is set, provide this sub-object as described below.

Link copied to clipboard
val customJson: Output<String>?

Custom JSON attributes to apply to the entire stack.

Link copied to clipboard

Name of the availability zone where instances will be created by default. Cannot be set when vpc_id is set.

Link copied to clipboard

The ARN of an IAM Instance Profile that created instances will have by default.

Link copied to clipboard
val defaultOs: Output<String>?

Name of OS that will be installed on instances by default.

Link copied to clipboard

Name of the type of root device instances will have by default.

Link copied to clipboard

Name of the SSH keypair that instances will have by default.

Link copied to clipboard
val defaultSubnetId: Output<String>

ID of the subnet in which instances will be created by default. Required if vpc_id is set to a VPC other than the default VPC, and forbidden if it isn't.

Link copied to clipboard
val hostnameTheme: Output<String>?

Keyword representing the naming scheme that will be used for instance hostnames within this stack.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val manageBerkshelf: Output<Boolean>?

Boolean value controlling whether Opsworks will run Berkshelf for this stack.

Link copied to clipboard
val name: Output<String>

The name of the stack.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val region: Output<String>

The name of the region where the stack will exist.

Link copied to clipboard
val serviceRoleArn: Output<String>

The ARN of an IAM role that the OpsWorks service will act as.

Link copied to clipboard
val stackEndpoint: Output<String>
Link copied to clipboard
val tags: Output<Map<String, String>>?

A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

Boolean value controlling whether the custom cookbook settings are enabled.

Link copied to clipboard

Boolean value controlling whether the standard OpsWorks security groups apply to created instances.

Link copied to clipboard
val vpcId: Output<String>

ID of the VPC that this stack belongs to. Defaults to the region's default VPC.