This commit is contained in:
Mitchell Hashimoto 2014-09-28 11:51:49 -07:00
parent e2534e4210
commit 3941dbac5d
10 changed files with 10 additions and 13 deletions

View File

@ -118,7 +118,7 @@ func resourceAwsInstance() *schema.Resource {
Optional: true, Optional: true,
}, },
"iam_instance_profile": &schema.Schema{ "iam_instance_profile": &schema.Schema{
Type: schema.TypeString, Type: schema.TypeString,
ForceNew: true, ForceNew: true,
Optional: true, Optional: true,
}, },

View File

@ -76,7 +76,7 @@ func resourceComputeFirewall() *schema.Resource {
"target_tags": &schema.Schema{ "target_tags": &schema.Schema{
Type: schema.TypeSet, Type: schema.TypeSet,
Optional: true, Optional: true,
Elem: &schema.Schema{Type: schema.TypeString}, Elem: &schema.Schema{Type: schema.TypeString},
Set: func(v interface{}) int { Set: func(v interface{}) int {
return hashcode.String(v.(string)) return hashcode.String(v.(string))
}, },
@ -298,7 +298,7 @@ func resourceFirewall(
var targetTags []string var targetTags []string
if v := d.Get("target_tags").(*schema.Set); v.Len() > 0 { if v := d.Get("target_tags").(*schema.Set); v.Len() > 0 {
targetTags = make([]string, v.Len()) targetTags = make([]string, v.Len())
for i, v:= range v.List() { for i, v := range v.List() {
targetTags[i] = v.(string) targetTags[i] = v.(string)
} }
} }

View File

@ -108,4 +108,3 @@ func TestGet_update(t *testing.T) {
t.Fatalf("doesn't look like get: %s", output) t.Fatalf("doesn't look like get: %s", output)
} }
} }

View File

@ -59,7 +59,7 @@ func (d *GitHubDetector) detectSSH(src string) (string, bool, error) {
u.Scheme = "ssh" u.Scheme = "ssh"
u.User = url.User("git") u.User = url.User("git")
u.Host = "github.com" u.Host = "github.com"
u.Path = src[idx+1:qidx] u.Path = src[idx+1 : qidx]
if qidx < len(src) { if qidx < len(src) {
q, err := url.ParseQuery(src[qidx+1:]) q, err := url.ParseQuery(src[qidx+1:])
if err != nil { if err != nil {
@ -69,5 +69,5 @@ func (d *GitHubDetector) detectSSH(src string) (string, bool, error) {
u.RawQuery = q.Encode() u.RawQuery = q.Encode()
} }
return "git::"+u.String(), true, nil return "git::" + u.String(), true, nil
} }

View File

@ -39,7 +39,7 @@ func (g *HgGetter) Get(dst string, u *url.URL) error {
} }
} }
if err:= g.pull(dst, u); err != nil { if err := g.pull(dst, u); err != nil {
return err return err
} }

View File

@ -34,7 +34,7 @@ func TestGet_file(t *testing.T) {
func TestGet_fileForced(t *testing.T) { func TestGet_fileForced(t *testing.T) {
dst := tempDir(t) dst := tempDir(t)
u := testModule("basic") u := testModule("basic")
u = "file::"+u u = "file::" + u
if err := Get(dst, u); err != nil { if err := Get(dst, u); err != nil {
t.Fatalf("err: %s", err) t.Fatalf("err: %s", err)
@ -76,7 +76,7 @@ func TestGetCopy_file(t *testing.T) {
func TestGetDirSubdir(t *testing.T) { func TestGetDirSubdir(t *testing.T) {
cases := []struct { cases := []struct {
Input string Input string
Dir, Sub string Dir, Sub string
}{ }{
{ {

View File

@ -2,9 +2,9 @@ package module
import ( import (
"bufio" "bufio"
"path/filepath"
"bytes" "bytes"
"fmt" "fmt"
"path/filepath"
"strings" "strings"
"sync" "sync"

View File

@ -41,7 +41,6 @@ func TestClient_ResourceProvider(t *testing.T) {
} }
} }
func TestClient_ResourceProvisioner(t *testing.T) { func TestClient_ResourceProvisioner(t *testing.T) {
clientConn, serverConn := testConn(t) clientConn, serverConn := testConn(t)

View File

@ -3,10 +3,10 @@ package terraform
import ( import (
"fmt" "fmt"
"reflect" "reflect"
"sort"
"strings" "strings"
"sync" "sync"
"testing" "testing"
"sort"
) )
func TestContextGraph(t *testing.T) { func TestContextGraph(t *testing.T) {

View File

@ -59,7 +59,6 @@ func (s *State) Children(path []string) []*ModuleState {
return result return result
} }
// AddModule adds the module with the given path to the state. // AddModule adds the module with the given path to the state.
// //
// This should be the preferred method to add module states since it // This should be the preferred method to add module states since it