Commit Graph

2524 Commits

Author SHA1 Message Date
Mitchell Hashimoto 7e379cb1a1 helper/schema: field readers no longer take a schema as arg 2015-01-03 12:13:46 -05:00
Mitchell Hashimoto 3ff859d734 helper/schema: MultiLevelFieldReader 2015-01-03 10:32:24 -05:00
Mitchell Hashimoto 0b1da37b20 helper/schema: diff field reader should merge result with source 2015-01-03 09:55:38 -05:00
Mitchell Hashimoto 91a57b42e8 helper/schema: reading a diff with computed should return zero value 2015-01-03 12:02:49 +05:30
Mitchell Hashimoto 73726e83b2 helper/schema: DiffFieldReader for reading data from a diff 2014-12-20 02:17:35 +05:30
Mitchell Hashimoto 9447973015 helper/schema: ConfigFieldReader and generic helpers 2014-12-19 22:52:53 +05:30
Mitchell Hashimoto 5f063d321f helper/schema: FieldReader needs to return computed status 2014-12-19 06:15:04 -05:00
Mitchell Hashimoto f416e0edf0 helper/schema: FieldReader and MapFieldReader 2014-12-19 05:56:46 -05:00
Mitchell Hashimoto 08348eed28 config: some extra comments 2014-12-18 11:50:01 -08:00
Mitchell Hashimoto e6289fbe63 Update CHANGELOG 2014-12-17 11:40:53 -08:00
Sander van Harmelen 54e558af82 Merge pull request #688 from ceh/yavf
yet another vet fix round
2014-12-17 13:10:05 +01:00
Emil Hessman fc36b1cd94 command: vet fix
Fixes the following vet report:

command/remote.go:165: wrong number of args for format in Sprintf call: 1 needed but 2 args
2014-12-17 13:02:19 +01:00
Emil Hessman 68a41035a9 builtin/providers/mailgun: vet fix
Fixes the following vet report:

builtin/providers/mailgun/resource_mailgun_domain_test.go:73: arg DomainResp.Domain.Wildcard for printf verb %s of wrong type: bool
2014-12-17 12:59:07 +01:00
Emil Hessman 7b704fb77d builtin/providers/heroku: vet fix
Fixes the following vet reports:

builtin/providers/heroku/resource_heroku_app.go:192: arg vs for printf verb %s of wrong type: bool
builtin/providers/heroku/resource_heroku_app.go:198: arg vs for printf verb %s of wrong type: bool
2014-12-17 12:58:12 +01:00
Emil Hessman 4f3f85b165 builtin/providers/aws: vet fix
Fixes the following vet reports:

builtin/providers/aws/resource_aws_network_acl.go:191: wrong number of args for format in Errorf call: 2 needed but 3 args
builtin/providers/aws/resource_aws_network_acl.go:264: wrong number of args for format in Errorf call: 1 needed but 2 args
builtin/providers/aws/resource_aws_network_acl.go:268: wrong number of args for format in Errorf call: 1 needed but 2 args
builtin/providers/aws/resource_aws_network_acl.go:286: arg m[to_port].(int) for printf verb %s of wrong type: int
builtin/providers/aws/resource_aws_network_acl_test.go:277: arg r.NetworkAcls for printf verb %s of wrong type: []github.com/mitchellh/goamz/ec2.NetworkAcl
builtin/providers/aws/resource_aws_subnet_test.go:21: arg v.MapPublicIpOnLaunch for printf verb %s of wrong type: bool
2014-12-17 12:37:46 +01:00
Emil Hessman 95fa353ee9 builtin/providers/atlas: vet fix
Fixes the following vet report:

builtin/providers/atlas/resource_artifact.go:139: arg user for printf verb %d of wrong type: string
2014-12-17 12:28:28 +01:00
Mitchell Hashimoto 1429ac6a7f terraform: return unknown variable value if nil 2014-12-16 18:43:18 -08:00
Mitchell Hashimoto 71918efd96 terraform: Add more tests for cases we felt weren't well covered 2014-12-16 15:59:26 -08:00
Mitchell Hashimoto e8ac16b2df helper/schema: test for empty state 2014-12-16 15:56:40 -08:00
Mitchell Hashimoto 3b5c8a44ea Merge pull request #685 from svanharmelen/f-add-test-for-diffing-diffs
core: adding a test for the change in PR #681 (diffing diffs)
2014-12-16 10:23:42 -08:00
Sander van Harmelen 8347569396 Adding a test for the change in PR #681
Should have already done that together with that PR…
2014-12-16 19:15:07 +01:00
Mitchell Hashimoto 2ba827ee3a update CHANGELOG 2014-12-16 09:16:11 -08:00
Mitchell Hashimoto af52e744da Merge pull request #682 from svanharmelen/f-provider/aws-fix-tests
provider/aws: updating the tests and refactoring the code a little
2014-12-16 09:14:41 -08:00
Mitchell Hashimoto e39aaa6604 Merge pull request #678 from hashicorp/track-map-element-count
helper/schema: track map element counts
2014-12-16 09:09:35 -08:00
Mitchell Hashimoto df05483cf6 helper/schema: test pass from SvH 2014-12-16 09:05:16 -08:00
Mitchell Hashimoto ef60ac5b8c terraform: update comment 2014-12-16 08:24:21 -08:00
Mitchell Hashimoto e5f07567c6 terraform: module input to another module doesn't error [GH-659] 2014-12-16 08:23:19 -08:00
Sander van Harmelen 9797881ed8 Updating the tests and refactoring the code a little
There was an error in the goamz package the prevented updating the
availability zones correctly. So PR #181 should be merged before this
one can be merged…
2014-12-16 15:21:25 +01:00
Sander van Harmelen e1201f079a Merge pull request #681 from svanharmelen/f-core-fix-diffing-diffs
core: adding a small fix to the Same() func (diffing diffs)
2014-12-16 15:19:03 +01:00
Sander van Harmelen d24ab685d0 Adding a small fix to the Same() func
This is a little tricky, but when a diff contains a computed list or
set that can only be interpolated after the apply command has created
the dependant resources, it could turn out that the result is actually
the same as the existing state which would remove the key from the diff
2014-12-16 13:58:31 +01:00
Sander van Harmelen 462cc24ce6 Merge pull request #680 from svanharmelen/f-provider/aws-update-aws-elb-resource
provider/aws: updating the resource to use a set instead of a list
2014-12-16 13:19:46 +01:00
Sander van Harmelen 3aeba87e38 Updating the resource to use a set instead of a list
By using a set for the availability zones, you can use things like
`availability_zones = ["${aws_instance.web.*.availability_zone}"]`
where is very likely multiple of the same zones will be added to the
set. If you use a list here, the list will say it’s changed (even if
you add the same zone) which will force a new resource.
2014-12-16 13:13:59 +01:00
Sander van Harmelen 7e091dd7bd Merge pull request #677 from svanharmelen/f-provider-aws-fix-route53-toggling
provider/aws: fixing the flipflop problem for the aws_route53 resource
2014-12-16 11:22:54 +01:00
Sander van Harmelen a7667986f9 Updated the code so it makes use of the available functionality
The `helper/schema` package already knows how to create a set from a
slice with set items. So let’s use that functionality…
2014-12-16 11:14:33 +01:00
Sander van Harmelen 40ca4c1c81 Merge pull request #676 from svanharmelen/f-fix-expand-bug
core: fix expand bug
2014-12-16 11:04:25 +01:00
Mitchell Hashimoto 8426f5140b Update CHANGELOG 2014-12-15 22:14:08 -08:00
Mitchell Hashimoto 675eab11d3 Merge pull request #679 from hashicorp/b-fix-module=type
config: validate that module variables can go to ints, convert [GH-624]
2014-12-15 22:13:02 -08:00
Mitchell Hashimoto d24082da1e config: validate that module variables can go to ints, convert [GH-624] 2014-12-15 22:10:16 -08:00
Mitchell Hashimoto 913f9a923e helper/schema: remove unnecessary code 2014-12-15 17:39:07 -08:00
Mitchell Hashimoto e5877543b2 helper/schema: track map element counts
This adds "field.#" values to the state/diff with the element count of a
map. This fixes a major issue around not knowing when child elements are
computed when doing variable access of a computed map.

Example, if you have a schema like this:

    "foo": &Schema{
        Type:     TypeMap,
        Computed: true,
    }

And you access it like this in a resource:

    ${type.name.foo.computed-field}

Then Terraform will error that "field foo could not be found on resource
type.name". By adding that "foo.#" is computed, Terraform core will pick
up that it WILL exist, so its okay.
2014-12-15 17:35:16 -08:00
Mitchell Hashimoto 41dabd7abc Update CHANGELOG 2014-12-15 16:41:09 -08:00
Mitchell Hashimoto 4f70630c52 Merge pull request #525 from pmoust/patch-2
provider/aws: update to support more regions
2014-12-15 16:40:35 -08:00
Sander van Harmelen 43a30e7d13 Finishing up the needed changes
Also executed the acceptance tests successfully now.
2014-12-16 00:59:47 +01:00
Sander van Harmelen ee7b33acf4 Fixing the flipflop problem
Actually meant as a PoC, but it works perfectly so let’s just merge
this…
2014-12-16 00:40:43 +01:00
Mitchell Hashimoto 5987ce30f9 up version for dev 2014-12-15 15:36:19 -08:00
Mitchell Hashimoto 935bc08003 update CHANGELOG 2014-12-15 15:36:07 -08:00
Mitchell Hashimoto c2385a5012 Merge pull request #632 from KushalP/master
config: do not read temporary editor files, fixes #548
2014-12-15 15:07:03 -08:00
Sander van Harmelen 528167513b Looking at issue #639 this seems to be the root cause
After fixing this part, there also needs to be made a change to the
example given or the schema of aws_elb.
2014-12-15 23:38:46 +01:00
Sander van Harmelen 820476ef61 Merge pull request #675 from svanharmelen/f-fix-typo/style
Fixed a type and reordered the case statements
2014-12-15 23:11:05 +01:00
Sander van Harmelen 40fa6c3aaa Fixed a type and reordered the case statements
Making in more inline with the existing code…
2014-12-15 23:02:16 +01:00