Stack Args
data class StackArgs(val agentVersion: Output<String>? = null, val berkshelfVersion: Output<String>? = null, val color: Output<String>? = null, val configurationManagerName: Output<String>? = null, val configurationManagerVersion: Output<String>? = null, val customCookbooksSources: Output<List<StackCustomCookbooksSourceArgs>>? = null, val customJson: Output<String>? = null, val defaultAvailabilityZone: Output<String>? = null, val defaultInstanceProfileArn: Output<String>? = null, val defaultOs: Output<String>? = null, val defaultRootDeviceType: Output<String>? = null, val defaultSshKeyName: Output<String>? = null, val defaultSubnetId: Output<String>? = null, val hostnameTheme: Output<String>? = null, val manageBerkshelf: Output<Boolean>? = null, val name: Output<String>? = null, val region: Output<String>? = null, val serviceRoleArn: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val useCustomCookbooks: Output<Boolean>? = null, val useOpsworksSecurityGroups: Output<Boolean>? = null, val vpcId: Output<String>? = null) : ConvertibleToJava<StackArgs>
Provides an OpsWorks stack resource.
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"
}
}
`,
});Content copied to clipboard
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"
}
}
""")Content copied to clipboard
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""
}
}
",
});
});Content copied to clipboard
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
})
}Content copied to clipboard
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());
}
}Content copied to clipboard
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"
}
}Content copied to clipboard
Import
Using pulumi import, import OpsWorks stacks using the id. For example:
$ pulumi import aws:opsworks/stack:Stack bar 00000000-0000-0000-0000-000000000000Content copied to clipboard
Constructors
Link copied to clipboard
fun StackArgs(agentVersion: Output<String>? = null, berkshelfVersion: Output<String>? = null, color: Output<String>? = null, configurationManagerName: Output<String>? = null, configurationManagerVersion: Output<String>? = null, customCookbooksSources: Output<List<StackCustomCookbooksSourceArgs>>? = null, customJson: Output<String>? = null, defaultAvailabilityZone: Output<String>? = null, defaultInstanceProfileArn: Output<String>? = null, defaultOs: Output<String>? = null, defaultRootDeviceType: Output<String>? = null, defaultSshKeyName: Output<String>? = null, defaultSubnetId: Output<String>? = null, hostnameTheme: Output<String>? = null, manageBerkshelf: Output<Boolean>? = null, name: Output<String>? = null, region: Output<String>? = null, serviceRoleArn: Output<String>? = null, tags: Output<Map<String, String>>? = null, useCustomCookbooks: Output<Boolean>? = null, useOpsworksSecurityGroups: Output<Boolean>? = null, vpcId: Output<String>? = null)
Functions
Properties
Link copied to clipboard