Commit Graph

2983 Commits

Author SHA1 Message Date
Paul Hinze e3a64ef5a5 Merge pull request #903 from hashicorp/updatedeps-without-deplist
Makefile: simplify updatedeps; no need for deplist
2015-02-01 09:53:45 -06:00
Paul Hinze b8fb0c0838 Makefile: simplify updatedeps; no need for deplist
After discussing with the very gracious @cespare over at
https://github.com/cespare/deplist/pull/2 I now understand that we can
pull off the same logic with just `go list`.

The logic is now simpler and more consistent:

 * List out all packages in our repo
 * For each of those packages, list their dependencies
 * Filter out any dependencies that already live in this repo
 * Remove duplicates
 * And fetch the rest. `go get` will work out all transitive dependencies
   from there
2015-01-30 18:29:12 -06:00
Paul Hinze 170ddc4bd4 Update CHANGELOG.md 2015-01-30 17:54:31 -06:00
Paul Hinze 44759903fa Merge pull request #895 from hashicorp/588-gcp-improvements
Multiple gcp improvements and new resources
2015-01-30 16:49:22 -06:00
Dave Cunningham 12db8bc9d3 Merge branch 'master' into oauth2 2015-01-30 17:48:49 -05:00
Paul Hinze d78309694a Update CHANGELOG.md 2015-01-30 16:46:35 -06:00
Paul Hinze 8749d0090a Merge pull request #899 from hashicorp/770-azure-provider
Add Azure provider
2015-01-30 16:36:51 -06:00
Ferran Rodenas f561e2a6a8 Add Azure provider 2015-01-30 16:32:35 -06:00
Paul Hinze 1e03892ff6 Merge pull request #901 from hashicorp/use-deplist-in-make-updatedeps
Makefile: new deps strategy fixes deps in branches
2015-01-30 16:30:51 -06:00
Paul Hinze a764adbf1b Makefile: new deps strategy fixes deps in branches
Currently when running `make updatedeps` from a branch, the dependency
list from master ends up getting used. We tried to work around this in
35490f7812, and got part way there, but
here's what was happening:

 - record the current SHA
 - run `go get -f -u -v ./...` which ends up checking out master
 - master is checked out early in the `go get` process, which means all
   subsequent dependencies are resolved from master
 - re-checkout the recorded SHA
 - run tests

This works in most cases, except when the branch being tested actually
changes the list of dependencies in some way.

Here we move away from letting `go get -v` walk through everything in
`./...`, instead building our own list of dependencies with the help of
`deplist`. We can then filter terraform packages out from the list, so
they don't get touched, and safely update the rest.

This should solve problems like those observed in #899 and #900.

__Note__: had to add a feature to deplist to make this work properly;
see 016ef97111
Working on getting it accepted upstream.
2015-01-30 16:27:54 -06:00
Dave Cunningham 1d41800cd2 Add docs 2015-01-30 15:12:13 -05:00
Dave Cunningham aa009516b7 Port to oauth2, fix #606 2015-01-30 14:53:09 -05:00
Phil Frost 863fd0c7d2 Avoid unnecessary updating of aws_subnet
If map_public_ip_on_launch was not specified, AWS picks a default of
"0", which is different than the "" in the state file, triggerinng an
update each time. Mark that parameter as Computed, avoiding the update.
2015-01-30 13:17:16 -05:00
Phil Frost 8eb5418c4a Implement apply_method for RDS parameters
This is necessary to support creating parameter groups with parameters
that require a reboot, since the RDS API will return an error when
attempting to set those parameters with ApplyMethod "immediate".
2015-01-30 13:06:15 -05:00
Phil Frost bfaf8ccee6 Support storage_type parameter for aws_db_instance
This allows provisioning "gp2" (general purpose SSD) storage for DB
instances.
2015-01-30 13:01:10 -05:00
Dave Cunningham 6046647f38 Multiple gcp improvements and new resources 2015-01-30 10:32:35 -06:00
Dave Cunningham e85c7113fa Allow specifying project or full URL when specifying image 2015-01-29 20:00:02 -05:00
Phil Frost 04e86697fb Fix error when refreshing on a deleted AWS subnet
If a subnet exists in the state file and a refresh is performed, the
read function for subnets would return an error. Now it updates the
state to indicate that the subnet no longer exists, so Terraform can
plan to recreate it.
2015-01-29 11:06:40 -05:00
Ryan Lewon 2923261ed7 Fix for outputs. 2015-01-28 21:19:52 -08:00
Paul Hinze 6947ba2518 update CHANGELOG.md 2015-01-28 17:28:26 -06:00
Paul Hinze 24c3718ac6 Merge pull request #884 from hashicorp/452-google-secrets-file
[REPACK] #452 providers/google: remove deprecated client secrets file
2015-01-28 17:21:11 -06:00
Mitchell Hashimoto 0c672aa03b Merge pull request #881 from sparkprime/float_fix
helper/schema: add some missing Float cases
2015-01-28 15:19:29 -08:00
Paul Hinze 0396cd1b0c update CHANGELOG.md 2015-01-28 16:29:58 -06:00
Paul Hinze 632fddd96d Merge pull request #874 from bitglue/fix_rds
Fix aws_db_instance to not recreate each time
2015-01-28 16:22:24 -06:00
Paul Hinze 9fff0b1729 providers/google: fix instance creation
with this commit, the google compute instance acceptance tests are
passing

 - remove GOOGLE_CLIENT_FILE requirement from provider tests to finish
   out #452
 - skip extra "#" key that shows up in metadata maps, fixes #757 and
   sprouts #883 to figure out core issue
 - more verbose variablenames in metadata parsing, since it took me
   awhile to grok and i thought there might have been a shadowing bug in
   there for a minute. maybe someday when i'm a golang master i'll be
   smart enough to be comfortable with one-char varnames. :)
2015-01-28 15:50:56 -06:00
stungtoat d3814d6180 providers/google: remove secrets file
fixes #452
2015-01-28 15:47:49 -06:00
Dave Cunningham aa2015ccd0 Fix failing tests 2015-01-28 16:20:14 -05:00
Dave Cunningham 3cbf1a3230 Fix missing import of math 2015-01-28 15:39:32 -05:00
Dave Cunningham 319933f551 Add some tests for TypeFloat 2015-01-28 15:22:47 -05:00
Dave Cunningham 18c26cb2eb Add some missing Float cases 2015-01-28 12:53:34 -05:00
Phil Frost 254b25a64f Fix aws_db_instance to not recreate each time
Several of the arguments were optional, and if omitted, they are
calculated. Mark them as such in the schema to avoid triggering an
update.

Go back to storing the password in the state file. Without doing so,
there's no way for Terraform to know the password has changed. It should
be hashed, but then interpolating the password yields a hash instead of
the password.

Make the `name` parameter optional. It's not required in any engine, and
in some (MS SQL Server) it's not allowed at all.

Drop the `skip_final_snapshot` argument. If `final_snapshot_identifier`
isn't specified, then don't make a final snapshot. As things were, it
was possible to create a resource with neither of these arguments
specified which would later fail when it was to be deleted since the RDS
API requires exactly one of the two.

Resolves issue #689.
2015-01-28 12:03:26 -05:00
Mitchell Hashimoto 045e23e55f Update CHANGELOG.md 2015-01-28 08:33:10 -08:00
Mitchell Hashimoto 36b7f08850 Merge pull request #877 from hashicorp/i-859-ignore-ec2-root-volume
providers/aws: ignore ec2 root devices
2015-01-28 08:32:27 -08:00
Mitchell Hashimoto f742ccb606 Merge pull request #876 from ceh/command-win-tests
command: fix test failures on OpenBSD, Windows
2015-01-28 08:24:17 -08:00
Paul Hinze 3cb5ba01a7 whitespace: fix mixed case indent 2015-01-28 05:16:04 -06:00
Paul Hinze c88c4a33e1 providers/aws: ignore ec2 root devices
fixes #859

EC2 root block devices are attached automatically at launch [1] and show
up in DescribeInstances responses from then on. By skipping these when
recording state, Terraform can avoid thinking there should be block
device changes when there are none.

Note this requires that https://github.com/mitchellh/goamz/pull/214 land
first so the proper field is exposed.

[1] http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/RootDeviceStorage.html
2015-01-28 05:14:21 -06:00
Emil Hessman 97227a5c70 config/module: fix detection of file paths on Windows
Absolute file paths were not correctly detected by module.Detect
when using url.Parse to parse the source URL. Wrap the detection
with urlParse to properly handle file path detections on Windows.

Fixes command test failures on Windows.
2015-01-28 10:40:32 +01:00
Emil Hessman 65177edd1e config/module: fix test failures on Windows
When parsing URLs on Windows, assume it is a drive letter path
if the second element is a ':' character. Format the drive letter
path as a "file:///"-path prior to parsing the URL.

Fixes test failures of the following form in command on Windows:

=== RUN TestApply_plan
--- FAIL: TestApply_plan (0.00s)
        apply_test.go:379: bad: 1

		module download not supported for scheme 'c'
2015-01-28 08:19:04 +01:00
Emil Hessman b40c2fe997 command: fix test failure on Windows
URLs are `/`-based. Windows path Separator is `\`.
Convert `\` in test fixture path to `/` with filepath.ToSlash
such that proper URLs are constructed even on Windows.

Fixes a test failure on Windows.
2015-01-28 08:13:44 +01:00
Emil Hessman 92e68c1ee6 command: fix test failure on Windows
Adjust the laddr argument to net.Listen to the form host:port,
as documented for net.Dial.

Fixes a test failure on Windows.
2015-01-28 08:10:52 +01:00
Paul Hinze c01f1a5ef0 Merge pull request #864 from paystee/doc_boolean_syntax
docs: update available boolean values
2015-01-27 19:40:13 -06:00
Paul Hinze 6e9c69b437 Merge pull request #871 from hashicorp/i-824-schema-field-reader-config-defaults
helper/schema: apply schema defaults at the field level when readi...
2015-01-27 19:35:56 -06:00
Paul Hinze 5d4e69cc80 helper/schema: apply schema defaults at the field level when reading from config
We were waiting until the higher-level (m schemaMap) diffString method
to apply defaults, which was messing with set hashcode evaluation for
cases when a field with a default is included in the hash function.

fixes #824
2015-01-27 18:18:57 -06:00
Mitchell Hashimoto e147d2d475 Merge pull request #872 from ceh/config-module-win-tests
config/module: fix test failures on Windows
2015-01-27 14:22:59 -08:00
Emil Hessman d5a49363d7 config/module: handle absolute file paths on Windows
Using url.Parse to parse an absolute file path on Windows yields
a URL type where the Path element is prefixed by a slash.

For example, parsing "file:///C:/Users/user" gives a URL type
with Path:"/C:/Users/user".

According to golang.org/issue/6027, the parsing is correct as is.

The leading slash on the Path must be eliminated before any file
operations.

This commit introduces a urlParse function which wraps the url.Parse
functionality and removes the leading slash in Path for absolute file
paths on Windows.

Fixes config/module test failures on Windows.
2015-01-27 23:18:47 +01:00
Emil Hessman 78d1fc742f config/module: adjust HttpGetter test to fix Windows test failure
Specify laddr on the form host:port in the call to net.Listen as
documented for net.Dial, see godoc.org/net#Dial

Fixes the following test failures on Windows:

> go test -run=TestHttpGetter
--- FAIL: TestHttpGetter_header (0.00s)
        get_http_test.go:31: err: Get http://[::]:52101/header?terraform-get=1: dial tcp [::]:52101: ConnectEx tcp: The requested address is not valid in its context.
--- FAIL: TestHttpGetter_meta (0.00s)
        get_http_test.go:55: err: Get http://[::]:52103/meta?terraform-get=1: dial tcp [::]:52103: ConnectEx tcp: The requested address is not valid in its context.
--- FAIL: TestHttpGetter_metaSubdir (0.00s)
        get_http_test.go:79: err: Get http://[::]:52105/meta-subdir?terraform-get=1: dial tcp [::]:52105: ConnectEx tcp: The requested address is not valid in its context.
FAIL
exit status 1
FAIL github.com/hashicorp/terraform/config/module    0.054s
2015-01-27 23:18:46 +01:00
Emil Hessman 74cf8fcabd config/module: adjust FileDetector tests for Windows
"/foo" is not an absolute path on Windows. Adjust the FileDetector
tests to take that into account when verifying the results.

Fixes FileDetector test failures on Windows.
2015-01-27 23:18:46 +01:00
Emil Hessman 160e4f926e config/module: fix panic on Windows when running tests
On Windows, Go returns paths with the `\` path separator.
Make sure we are using `/` even on Windows since URLs are `/`-based.
2015-01-27 07:52:51 +01:00
Mitchell Hashimoto c49ae2baa0 Update CHANGELOG 2015-01-26 18:20:42 -08:00
Mitchell Hashimoto 703a11ed7e Comment Makefile 2015-01-26 18:19:32 -08:00