Stack
Provides an OpsWorks stack resource.
Example Usage
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()
.region("us-west-1")
.serviceRoleArn(aws_iam_role.opsworks().arn())
.defaultInstanceProfileArn(aws_iam_instance_profile.opsworks().arn())
.tags(Map.of("Name", "foobar-stack"))
.customJson("""
{
"foobar": {
"version": "1.0.0"
}
}
""")
.build());
}
}
Import
OpsWorks stacks can be imported using the id
, e.g.,
$ pulumi import aws:opsworks/stack:Stack bar 00000000-0000-0000-0000-000000000000
Properties
If set to "LATEST"
, OpsWorks will automatically install the latest version.
If manage_berkshelf
is enabled, the version of Berkshelf to use.
Name of the configuration manager to use. Defaults to "Chef".
Version of the configuration manager to use. Defaults to "11.4".
When use_custom_cookbooks
is set, provide this sub-object as described below.
Custom JSON attributes to apply to the entire stack.
Name of the availability zone where instances will be created by default. Cannot be set when vpc_id
is set.
The ARN of an IAM Instance Profile that created instances will have by default.
Name of the type of root device instances will have by default.
Name of the SSH keypair that instances will have by default.
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.
Keyword representing the naming scheme that will be used for instance hostnames within this stack.
Boolean value controlling whether Opsworks will run Berkshelf for this stack.
The ARN of an IAM role that the OpsWorks service will act as.
Boolean value controlling whether the custom cookbook settings are enabled.
Boolean value controlling whether the standard OpsWorks security groups apply to created instances.