Commit Graph

21041 Commits

Author SHA1 Message Date
Martin Atkins
09b17b79e9 Update CHANGELOG.md 2018-01-03 12:17:21 -08:00
goraxe
fb6b349e58 backend/s3: Allow forcing use of the S3 path-style API
This is useful when the underlying API is an S3-workalike service, rather than official S3.
2018-01-03 12:15:47 -08:00
Martin Atkins
5c05851460 Update CHANGELOG.md 2018-01-03 12:13:38 -08:00
Paul Stack
191cf283d5 backend/manta: Support Triton RBAC
Triton Manta allows an account other than the main triton account to be used via RBAC.

Here we expose the SDC_USER / TRITON_USER options to the backend so that a user can be specified.
2018-01-03 12:12:46 -08:00
Charles Chan
894a7c966e website: tweak ambiguous nesting of punctuation inside quotes
Our prevailing writing style is to place punctuation outside of quotes, since in many contexts Terraform itself treats punctuation within quotes as significant and so it can be confusing to use punctuation in quotes in our prose.
2018-01-03 12:00:19 -08:00
Pierre-Alain TORET
128f4d19e1 config: Allow build on DragonFlyBSD
DragonFlyBSD is not officially supported, but allowing it to work is straightforward at the moment so we'll allow it for now.
2018-01-03 11:36:47 -08:00
James Bardin
3d9c9e5e28 Merge pull request #17025 from hashicorp/jbardin/module-errors
use the full module name with host for errors
2018-01-03 10:51:40 -05:00
James Bardin
cf4995d8a7 use the full module name with host for errors
The module related logs and errors should reference the full module name
including the source host.
2018-01-03 10:44:41 -05:00
Mitchell Hashimoto
4700a86ee6 Merge pull request #16975 from yaron/master
Small typo fix in provider documentation
2017-12-23 16:49:35 -08:00
Yaron Tal
a40eac1cca Small typo fix in provider documentation 2017-12-22 12:23:13 +01:00
Clint
f43d66e143 Revert "Restructure terraform.io to include provider categories (#16934)" (#16966)
This reverts commit 7481c113ee.
2017-12-20 17:25:43 -06:00
Chris Griggs
7481c113ee Restructure terraform.io to include provider categories (#16934)
* add catagory files

* try new source path

* cleaning up formatting

* fixin

* add all providers to providers index page

* add descriptions

* add link to form and first two providers

* small edits

* small edits

* small changes

* add community providers and decription edit from marketing

* add some lines to improve design

* fix typos
2017-12-20 16:26:41 -06:00
James Bardin
119056b324 Merge pull request #16954 from henrybell/typo-fix
Fix typo ('depracted' -> 'deprecated')
2017-12-20 15:54:38 -05:00
James Bardin
a262a0e046 Merge pull request #16957 from hashicorp/jbardin/computed-diff
Restore ability for an empty string to be considered unset in a computed value
2017-12-20 09:20:43 -05:00
James Bardin
0df8da59f7 add FIXMEs
This new codepath with the getDiff "customzed" return value, along with
the associated test need to be removed as soon as we can support unset
fields from the config, so we don't continue to carry this broken
behavior forward any longer than needed.
2017-12-20 08:51:00 -05:00
Chris Marchesi
cb5ce1d35e helper/schema: Extend diffChange and bubble up customized values
This extends the internal diffChange method so that ResourceDiff's
implementation of it can report back whether or not the value came from
a customized diff.

This is an effort to work to preserve the pre-ResourceDiff behaviour
that ignores the diff for computed keys when the old value was populated
but the new value wasn't - this behaviour is actually being depended on
by users that are using it to exploit using zero values in modules. This
should allow both scenarios to co-exist by shifting the NewComputed
exemption over to exempting values that come from diff customization.
2017-12-19 16:06:57 -08:00
James Bardin
643ef4334f revert the change that broke the test case
This reverts one of the changes from 6a4f7b0, which broke empty strings
being seen as unset for computed values.

This breaks a number of other tests, and is only an intermediate change
for evaluating other solutions.
2017-12-19 16:14:07 -05:00
James Bardin
7a8a443994 add failing test case
This case should be expected to fail with the current diff algorithm,
but the existing behavior was widely relied upon so we need to roll this
back until there is a representable nil value.
2017-12-19 15:14:58 -05:00
Chris Marchesi
c2c9e4f418 Merge pull request #16583 from hashicorp/azurerm-website
Renaming the Azure Provider
2017-12-19 11:00:33 -08:00
Henry Bell
56357c0ab7 Fix typo ('depracted' -> 'deprecated') 2017-12-19 16:43:06 +00:00
Clint
a8f08faab5 copy doc note from terraform-providers/terraform-provider-aws/2162 (#16940) 2017-12-19 10:29:55 -06:00
Sander van Harmelen
80e3511c9d Merge pull request #16951 from costastf/master
vendor: update posener complete install
2017-12-19 13:34:54 +01:00
Costas Tyfoxylos
470eaa5c78 vendor: update posener complete install 2017-12-19 13:02:16 +01:00
Martin Atkins
c647b22d97 helper/customdiff: Helper functions for CustomizeDiff
The CustomizeDiff functionality in helper/schema is powerful, but directly
writing single CustomizeDiff functions can obscure the intent when a
number of different, orthogonal diff-customization behaviors are required.

This new library provides some building blocks that aim to allow a more
declarative form of CustomizeDiff implementation, by composing a number of
smaller operations. For example:

     &schema.Resource{
         // ...
         CustomizeDiff: customdiff.All(
             customdiff.ValidateChange("size", func (old, new, meta interface{}) error {
                 // If we are increasing "size" then the new value must be
                 // a multiple of the old value.
                 if new.(int) <= old.(int) {
                     return nil
                 }
                 if (new.(int) % old.(int)) != 0 {
                     return fmt.Errorf("new size value must be an integer multiple of old value %d", old.(int))
                 }
                 return nil
             }),
             customdiff.ForceNewIfChange("size", func (old, new, meta interface{}) bool {
                 // "size" can only increase in-place, so we must create a new resource
                 // if it is decreased.
                 return new.(int) < old.(int)
             }),
             customdiff.ComputedIf("version_id", func (d *schema.ResourceDiff, meta interface{}) bool {
                 // Any change to "content" causes a new "version_id" to be allocated.
                 return d.HasChange("content")
             }),
         ),
     }

The goal is to allow the various separate operations to be quickly seen
and to ensure that each of them runs independently of the others. These
functions all create closures on the call parameters, so the result is
still just a normal CustomizeDiffFunc and so the helpers in this package
can be combined with hand-written functions as needed.

As we get more experience writing CustomizeDiff functions we may wish to
expand the repertoire of functions here in future; this initial set
attempts to cover some common cases we've seen so far. We may also
investigate some helper functions that are entirely declarative and so
don't take callback functions at all, but want to learn what the relevant
use-cases are before going in too deep here.
2017-12-18 10:38:20 -08:00
Stuart Auld
1d1984771b helper/resource: test check helpers for resources in non-root modules 2017-12-18 05:58:10 -08:00
Kevin Fishner
b13945f53c Merge pull request #16931 from nfagerlund/dec2017_private_git_modules
docs: Clarify the use of private github repos with TFE
2017-12-15 16:04:46 -08:00
Nick Fagerlund
40fefbd5e8 docs: Clarify the use of private github repos with TFE
The machine user/password approach is wrong for TFE; use SSH keys instead.
2017-12-14 17:35:50 -08:00
James Bardin
03ddb9134a Merge pull request #16903 from rwcee/build-service-auth-token
Adds "build_auth_token" option to Habitat Provisioner
2017-12-14 09:18:50 -05:00
James Bardin
f00dc45e8f Merge pull request #16780 from nevans-sofi/processIgnoreChangesPatch
Ignore redundant IgnoreChanges attributes
2017-12-13 16:07:35 -05:00
Rob Campbell
29f70bc112 Adds build_auth_token to Habitat Provisioner
First successful run with private origin and HAB_AUTH_TOKEN set

Update struct, schema, and decodeConfig names to more sensible versions

Cleaned up formatting

Update habitat provisioner docs

Remove unused unitstring
2017-12-12 19:46:42 -05:00
Martin Atkins
681b2e7587 Update CHANGELOG.md 2017-12-12 15:30:02 -08:00
Gauthier Wallet
474c592569 backend/s3: allow named credentials profiles to be used
Here we upgrade the AWS Go SDK to 1.12.27 and AWS provider to include terraform-providers/terraform-provider-aws#1608. 

This includes the capability to use named credentials profiles from the `~/.aws/credentials` file to authenticate to the backend.
2017-12-12 15:27:05 -08:00
Maciej Skierkowski
0186db7962 Merge pull request #16901 from skierkowski/tfe-ga-updates
Updating links to TFE docs
2017-12-12 09:46:30 -08:00
Florian Forster
6680b1f16b core: check for negative indices in ResourceConfig.get
The bounds checking in ResourceConfig.get() was insufficient: it detected when the index was greater than or equal to cv.Len() but not when the index was less than zero. If the user provided an (invalid) configuration that referenced "foo.-1.bar", the provider would panic.

Now it behaves the same way as if the index were too high.
2017-12-12 09:18:38 -08:00
Maciej Skierkowski
c1469aa39e Rename links for TFE classic and beta 2017-12-11 19:05:11 -08:00
Maciej Skierkowski
4a3c65984a Update not on TFE Module Registry availability 2017-12-11 19:04:54 -08:00
Maciej Skierkowski
8c2ed71163 Updates guides menu to use new TFE paths 2017-12-11 19:04:34 -08:00
Martin Atkins
f1079257ac command: show a special error message when importing in an empty dir
If users run "terraform import" in a directory with no Terraform
configuration files, it's likely that they've made a mistake either by
being in the wrong directory or forgetting to use the -config option
on the command line.

To help users find their mistake in this case, we'll now produce a
specialized error message for this situation:

    Error: No Terraform configuration files

    The directory /home/user/example does not contain any Terraform
    configuration files (.tf or .tf.json). To specify a different
    configuration directory, use the -config="..." command line option.

While here, this also converts some of the other existing messages to
diagnostics so that we can show any configuration warnings along with
the error message, and move towards the new standard error presentation.
2017-12-11 16:08:33 -08:00
James Bardin
a7677e761a Merge pull request #16892 from xtruder/master
vendor: github.com/hashicorp/go-version
2017-12-11 18:35:09 -05:00
Chris Marchesi
85119304b3 Merge pull request #16895 from hashicorp/b-resource-test-expecterror
helper/resource: Fail tests with no error that have ExpectError set
2017-12-11 14:18:55 -08:00
Chris Marchesi
3f8dad30c9 helper/resource: Fail tests with no error that have ExpectError set
Looks like while we were checking errors correctly when ExpectError was
set, we weren't checking for the *absence* of an error, which is should
be checked as well (no error is still not the error we are looking for).

Added a few more tests for ExpectError as well.
2017-12-11 14:05:40 -08:00
Rob Campbell
5daeee5f6d Update various files for new version of "stringer"
The latest version of stringer now uses strconv instead of fmt.
2017-12-11 13:26:29 -08:00
Jaka Hudoklin
fd687a5b9e vendor: github.com/hashicorp/go-version 2017-12-11 17:48:52 +01:00
Martin Atkins
c729bdff43 website: guide for using the S3 backend with multiple AWS accounts
Users commonly ask how the S3 backend can be used in an organization that
splits its infrastructure across many AWS accounts.

We've traditionally shied away from making specific recommendations here
because we can't possibly anticipate the different standards and
regulations that constrain each user. This new section attempts to
describe one possible approach that works well with Terraform's workflow,
with the goal that users make adjustments to it taking into account their
unique needs.

Since we are intentionally not being prescriptive here -- instead
considering this just one of many approaches -- it deviates from our usual
active writing style in several places to avoid giving the impression that
these are instructions to be followed exactly, which in some cases
requires the use of passive voice even though that is contrary to our
documentation style guide. For similar reasons, this section is also
light on specific code examples, since we do not wish to encourage users
to just copy-paste the examples without thinking through the consequences.
2017-12-08 16:53:43 -08:00
Clint
bed1ea1542 Merge pull request #16885 from hashicorp/add-opentelekomcloud
add opentelekomcloud link to docs
2017-12-08 16:52:20 -06:00
clint shryock
ccbd3db2b7 add opentelekomcloud link to docs 2017-12-08 16:45:33 -06:00
Martin Atkins
252e814584 Update CHANGELOG.md 2017-12-07 16:32:56 -08:00
Martin Atkins
46e5f497e2 Update CHANGELOG.md 2017-12-07 16:31:29 -08:00
Nolan Davidson
a50a383946 Additional work on the habitat provisioner.
Signed-off-by: Nolan Davidson <ndavidson@chef.io>
2017-12-07 16:29:30 -08:00
Nolan Davidson
653db95df7 Initial implementation of a habitat provisioner
First pass at loading the config data using the TF schema.

Signed-off-by: Nolan Davidson <ndavidson@chef.io>
2017-12-07 16:29:30 -08:00