Skip to content

Instantly share code, notes, and snippets.

@u2mejc
Last active April 18, 2016 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save u2mejc/c504bd9b027a3bf14c9d0cda10a53589 to your computer and use it in GitHub Desktop.
Save u2mejc/c504bd9b027a3bf14c9d0cda10a53589 to your computer and use it in GitHub Desktop.
/* 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
* aws_opsworks_stack.terraform-bastion: ValidationException: Default Os: Ubuntu 14.04 LTS is unsupported with Chef::11.4. Please consult the AWS OpsWorks documentation at http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-os.html to learn more about the current supported combinations.
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"
default_os = "Ubuntu 14.04 LTS"
configuration_manager_version = "11.10"
region = "eu-west-1"
vpc_id = "${var.VPC_ID}"
default_subnet_id = "${var.SUBNET_ID}"
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