Commit Graph

9111 Commits

Author SHA1 Message Date
Dan Carley
1b967e612f command/fmt: Accept optional directory argument
So that you can operate on files in a directory other than your current
working directory.
2016-03-07 15:07:14 +00:00
Dan Carley
c753390399 command/fmt: Default write and list to true
The most common usage usage will be enabling the `-write` and `-list`
options so that files are updated in place and a list of any modified files
is printed. This matches the default behaviour of `go fmt` (not `gofmt`). So
enable these options by default.

This does mean that you will have to explicitly disable these if you want to
generate valid patches, e.g. `terraform fmt -diff -write=false -list=false`
2016-03-07 15:07:14 +00:00
Dan Carley
cc41c7cfa0 command/fmt: Add new fmt command
This uses the `fmtcmd` package which has recently been merged into HCL. Per
the usage text, this rewrites Terraform config files to their canonical
formatting and style.

Some notes about the implementation for this initial commit:

- all of the fmtcmd options are exposed as CLI flags
- it operates on all files that have a `.tf` suffix
- it currently only operates on the working directory and doesn't accept a
  directory argument, but I'll extend this in subsequent commits
- output is proxied through `cli.UiWriter` so that we write in the same way
  as other commands and we can capture the output during tests
- the test uses a very simple fixture just to ensure that it is working
  correctly end-to-end; the fmtcmd package has more exhaustive tests
- we have to write the fixture to a file in a temporary directory because it
  will be modified and for this reason it was easier to define the fixture
  contents as a raw string
2016-03-07 15:07:04 +00:00
Radek Simko
53559ac8bf Merge pull request #5485 from dcgoss/patch-1
Added disk_size_gb documentation to resource "google_compute_instance_template"
2016-03-07 06:47:32 +00:00
Derek Goss
91204cf7eb Added disk_size_gb documentation to resource "google_compute_instance_template"
This was missing in the docs yet was implemented in Terraform. See line 81 in https://github.com/hashicorp/terraform/blob/master/builtin/providers/google/resource_compute_instance_template.go
2016-03-06 21:44:55 -05:00
James Nugent
3eb0a95f53 Merge pull request #5466 from xbs13/patch-2
Fix Atlas tutorial steps for currently released version
2016-03-06 13:11:05 -06:00
Martin Atkins
cd38881d6a Merge pull request #5475 from kjmkznr/fix-aws-docs-current
website: Fix missing sidebar_current
2016-03-06 08:24:43 -08:00
Kazunori Kojima
fbc94cb330 website: Fix missing sidebar_current 2016-03-06 23:51:25 +09:00
Radek Simko
38078fbfb8 Merge pull request #5470 from TimeIncOSS/f-api-gateway-cleanup
provider/aws: Cleanup nitpicks in new API Gateway resources
2016-03-06 10:34:47 +00:00
Radek Simko
61d0d19ae3 Fix typo (APIGateway -> API Gateway) 2016-03-06 09:29:31 +00:00
Radek Simko
c6c2752211 provider/aws: Sort API Gateway resources alphabetically 2016-03-06 09:29:31 +00:00
Radek Simko
fa0d6af524 provider/aws: Remove unnecessary GetChange in Delete funcs 2016-03-06 09:29:31 +00:00
Radek Simko
b12d906258 aws/docs: Fix wrong field name (parent_resource_id -> parent_id) 2016-03-06 09:29:31 +00:00
Radek Simko
a338eae72a provider/aws: Guard APIGateway resource & REST API against deletion 2016-03-06 09:29:30 +00:00
Radek Simko
0c5a0f96c2 vendor: Update github.com/aws/aws-sdk-go/service/apigateway 2016-03-06 09:29:24 +00:00
Radek Simko
caaf9baf45 Update CHANGELOG.md 2016-03-06 09:02:02 +00:00
Radek Simko
ce5324b341 Merge pull request #4295 from nicolai86/feature/aws-api-gateway
provider/aws: API Gateway resources
2016-03-06 09:00:02 +00:00
Raphael Randschau
6430fca7f6 Add aws_api_gateway_deployment resource 2016-03-05 23:21:58 +01:00
Raphael Randschau
8c59d0861e Add aws_api_gateway_api_key resource 2016-03-05 23:21:54 +01:00
Raphael Randschau
b4c99f1009 Add aws_api_gateway_model resource 2016-03-05 23:21:51 +01:00
Raphael Randschau
4da8b3d03a Add aws_api_gateawy_integration_response resource 2016-03-05 23:21:48 +01:00
Raphael Randschau
1593dbe9c8 Add aws_api_gateway_integration resource 2016-03-05 23:21:44 +01:00
Raphael Randschau
91f5206f8d Add aws_api_gateway_method_response resource 2016-03-05 23:21:41 +01:00
Raphael Randschau
032e6081cb Add aws_api_gateway_method resource 2016-03-05 23:21:38 +01:00
Raphael Randschau
7ead800f6a Add aws_api_gateway_resource resource 2016-03-05 23:21:35 +01:00
Raphael Randschau
a73721d248 Add aws_api_gateway_rest_api resource 2016-03-05 23:13:38 +01:00
Raphael Randschau
fdf0cfa66d Vendor AWS APIGateway API 2016-03-05 23:12:19 +01:00
Paul Stack
304ccdfb8f Update CHANGELOG.md 2016-03-05 19:20:19 +01:00
Paul Stack
b66b9c92a2 Merge pull request #5401 from Originate/mb-fix-kinesis-stream-shard-count
provider/aws: Report the correct number of shards for Kinesis streams
2016-03-05 19:19:16 +01:00
Paul Stack
eda1230479 Merge pull request #5469 from stack72/b-aws-kinesis-stream-shardcount
provider/aws: Adding a test for AWS Kinesis Stream Shard Count
2016-03-05 19:14:24 +01:00
stack72
d63166c025 provider/aws: Adding a test for AWS Kinesis Stream Shard Count 2016-03-05 18:40:47 +01:00
Paul Stack
75679a1eb2 Merge pull request #5461 from marcosnils/dynamodb_stream_fix
Fix DynamoDB stream attribute scope
2016-03-05 18:39:49 +01:00
Radek Simko
d86caf436b Merge pull request #5468 from f440/update-command-example
Bring usage docs up to date
2016-03-05 13:30:03 +00:00
f440
b7008babd7 Bring usage docs up to date 2016-03-05 19:25:16 +09:00
Michael Perez
9c3917f435 Update remote.html.markdown
these changes were added to reflect what was required to run the tutorial on my local machine. Below is my context for the above changes:
```shell
[2016-03-04T18:22:44] micperez in terraform_test  
λ terraform remote config -backend-config="name=puhrez/getting-started"
missing 'access_token' configuration or ATLAS_TOKEN environmental variable

If the error message above mentions requiring or modifying configuration
options, these are set using the `-backend-config` flag. Example:
-backend-config="name=foo" to set the `name` configuration
[2016-03-04T18:23:27] micperez in terraform_test  
λ export ATLAS_TOKEN=<REDACTED>
[2016-03-04T18:24:12] micperez in terraform_test  
λ terraform remote config -backend-config="name=puhrez/getting-started"
Remote state management enabled
Remote state configured and pulled.
[2016-03-04T18:24:16] micperez in terraform_test  
λ terraform push -name="puhrez/getting-started"
An error has occurred while archiving the module for uploading:
error detecting VCS: no VCS found for path: /Users/micperez/code/terraform_test
[2016-03-04T18:24:39] micperez in terraform_test  
λ git init
Initialized empty Git repository in /Users/micperez/code/terraform_test/.git/
[2016-03-04T18:25:09] micperez in terraform_test [git:master]  
λ terraform push -name="puhrez/getting-started"
An error has occurred while archiving the module for uploading:
error getting git commit: exit status 128
stdout: 
stderr: fatal: bad default revision 'HEAD'

[2016-03-04T18:25:12] micperez in terraform_test [git:master]  
λ git status
On branch master

Initial commit

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	.terraform/
	example.tf
	terraform.tfstate.backup

nothing added to commit but untracked files present (use "git add" to track)
[2016-03-04T18:25:17] micperez in terraform_test [git:master]  
λ git add example.tf
[2016-03-04T18:25:24] micperez in terraform_test [git:master]  
λ git commit -m "init commit"
[master (root-commit) 34c4fa5] init commit
 1 file changed, 10 insertions(+)
 create mode 100644 example.tf
[2016-03-04T18:25:32] micperez in terraform_test [git:master]  
λ terraform push -name="puhrez/getting-started"
Uploading Terraform configuration...
Configuration "puhrez/getting-started" uploaded! (v1)
```
2016-03-04 18:42:32 -05:00
Paul Hinze
76373b70fb website: underscore not allowed in vsphere VM name
closes #5448
2016-03-04 17:15:09 -06:00
Marcos Lilljedahl
cb9f1fb8fa Fix DynamoDB stream attribute scope
Stream information is at the table level and not at the LSI / GSI

Reference: http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_CreateTable.html

Signed-off-by: Marcos Lilljedahl <marcosnils@gmail.com>
2016-03-04 16:17:57 -05:00
Joe Topjian
f11448c692 Update CHANGELOG.md 2016-03-03 21:36:42 -07:00
Joe Topjian
a786d3d4ae Merge pull request #5432 from jtopjian/openstack-instance-tenantnet-403
provider/openstack: Account for a 403 reply from os-tenant-networks
2016-03-03 21:35:40 -07:00
James Nugent
76f203e7e4 build: Update make core-test for vendoring 2016-03-03 18:08:31 -06:00
Paul Hinze
8d31c93862 Merge pull request #5439 from evandbrown/pubsub
provider/google: Fix Pubsub acceptance tests
2016-03-02 18:37:31 -06:00
Evan Brown
2e958f7a12 provider/google: Fix Pubsub acceptance tests
Acceptance tests for Pubsub topics and subscriptions failed after
incorrectly determining that resources were not deleted in the
CheckDestroy phase.

Fixes 5437
2016-03-02 15:36:32 -08:00
Paul Hinze
57bd4dcd4f Merge pull request #5433 from evandbrown/vpntest
provider/google: Fix VPN tunnel creation test
2016-03-02 16:00:54 -06:00
Joe Topjian
65d96ef58a provider/openstack: Account for a 403 reply from os-tenant-networks 2016-03-02 21:17:59 +00:00
Evan Brown
87006d6a0c provider/google: Fix VPN tunnel creation test
The GCE API for creating VPN tunnels began validating the `peerIp` field
and rejecting RFC5735 addresses. The previous test was using one of
these addresses and failing as a result. This commit uses 8.8.8.8
for the peerIp.
2016-03-02 13:17:38 -08:00
Paul Hinze
834bfcdc7a providder/azure: ASM image names have dates in them :-| 2016-03-02 13:02:48 -06:00
Paul Hinze
a7a9b14c59 Merge pull request #5405 from gamename/master
Updates to docs per request on mailer
2016-03-01 17:28:42 -06:00
gamename
3bc09db7e0 docs(variables): redundant wording 2016-03-01 17:13:05 -06:00
gamename
c6b350b98e docs(variables): describe order of evaluation with files 2016-03-01 17:08:57 -06:00
Joe Topjian
986eefcfe2 Merge pull request #5391 from jtopjian/openstack-secgroup-icmp-zero
provider/openstack: Allow ICMP Security Groups with values of zero
2016-03-01 12:48:12 -07:00