Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/* Terraform template to reproduce OpsWorks Stack bug
Reproduce:
- copy this file to empty dir and cd into dir
$ terrafrom -version
Terraform v0.6.14
$ terrafrom apply
- Change the name of the stack now.
$ terrafrom plan
aws_opsworks_stack.main
name: "awesome-stack-too" => "awesome-stack-two"
$ terrafrom apply
aws_opsworks_stack.main: Modifying...
name: "awesome-stack-too" => "awesome-stack-two"
Error applying plan:
1 error(s) occurred:
* aws_opsworks_stack.main: ValidationException: Custom Cookbooks Source's Type: Unsupported scm type
status code: 400, request id: *snip*
*/
#### Variables set in ENV by appending TF_VAR_ ####
variable "VPC_ID" {} # TF_VAR_VPC_ID
variable "SUBNET_ID" {} # TF_VAR_SUBNET_ID
variable "ROLE_ID" {} # TF_VAR_ROLE_ID
variable "PROFILE_ID" {} # TF_VAR_PROFILE_ID
#### Define Opsworks Stacks ####
resource "aws_opsworks_stack" "main" {
name = "awesome-stack-too"
vpc_id = "${var.VPC_ID}"
default_subnet_id = "${var.SUBNET_ID}"
region = "eu-west-1"
service_role_arn = "${var.ROLE_ID}"
default_instance_profile_arn = "${var.PROFILE_ID}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.