Fix acceptance tests

This commit is contained in:
DJ Home 2016-09-29 13:00:52 +01:00
parent 1bc154535f
commit 979afcecdc
3 changed files with 6 additions and 3 deletions

View File

@ -15,7 +15,7 @@ func TestAccAWSOpsWorksStack_importBasic(t *testing.T) {
name := acctest.RandString(10)
resourceName := "aws_opsworks_stack.bar"
resourceName := "aws_opsworks_stack.tf-acc"
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },

View File

@ -286,6 +286,9 @@ func resourceAwsOpsworksStackRead(d *schema.ResourceData, meta interface{}) erro
d.Set("default_subnet_id", stack.DefaultSubnetId)
d.Set("hostname_theme", stack.HostnameTheme)
d.Set("use_custom_cookbooks", stack.UseCustomCookbooks)
if stack.CustomJson != nil {
d.Set("custom_json", stack.CustomJson)
}
d.Set("use_opsworks_security_groups", stack.UseOpsworksSecurityGroups)
d.Set("vpc_id", stack.VpcId)
if color, ok := stack.Attributes["Color"]; ok {

View File

@ -411,11 +411,11 @@ resource "aws_vpc" "tf-acc" {
resource "aws_subnet" "tf-acc" {
vpc_id = "${aws_vpc.tf-acc.id}"
cidr_block = "${aws_vpc.tf-acc.cidr_block}"
availability_zone = "us-west-2a"
availability_zone = "us-east-1a"
}
resource "aws_opsworks_stack" "tf-acc" {
name = "%s"
region = "us-west-2"
region = "us-east-1"
vpc_id = "${aws_vpc.tf-acc.id}"
default_subnet_id = "${aws_subnet.tf-acc.id}"
service_role_arn = "${aws_iam_role.opsworks_service.arn}"