Commit Graph

28320 Commits

Author SHA1 Message Date
Alisdair McDiarmid 7cfba365dc
Merge pull request #26936 from hashicorp/alisdair/unmark-provider-arguments
terraform: Unmark provider configuration arguments
2020-11-16 14:01:02 -05:00
Alisdair McDiarmid 1c7f412d13 terraform: Unmark provider configuration arguments
Before configuring a provider, we need to unmark the configuration
object, in case it includes any sensitive values. This is required
because configuration occurs over gRPC, which doesn't support sensitive
marks.
2020-11-16 13:13:20 -05:00
Martin Atkins a977d2e8d4
Merge #25964: Fix inconsistencies in the Module Registry Protocol docs 2020-11-16 10:12:46 -08:00
Martin Atkins 7ccaee1018 website: Fix inconsistencies in the registry protocol page
Some hasty, incorrect merge conflict fixing caused this page to have a
strange mix of terminology between "system" and "provider". Along with
that, there were also several editorial errors caused by text on this
page having originally been derived from the provider registry
documentation.

This documentation will now consistently talk about being a module
registry protocol rather than a provider registry protocol, and it will
consistently use the term "system" as a generic term for the final part
of the module source address, aside from noting that there is an optional
convention to name it after the "type" part of an official provider when
possible.
2020-11-16 10:06:27 -08:00
Andrew Fitzgerald 8c82b3f6a0 Remove 'system' references from module registry protocol docs. 2020-11-16 10:01:03 -08:00
Kristin Laemmert c1d30401c5
Merge pull request #26931 from TEDmk/patch-1
website/docs: Add a missing new line
2020-11-16 10:35:36 -05:00
Alvin Huang 978a80a377
Merge pull request #26756 from hashicorp/docker-mirror
switch to hashicorp docker mirror
2020-11-16 10:19:37 -05:00
TEDmk 8195a99529
Add a missing new line
The missing new line doesn't permit the code block to show up.
2020-11-16 16:08:55 +01:00
Rémi Lapeyre d81d521bcd Use a global sequence to create the IDs for each workspace
Until now the default workspace for every project would have the ID 1,
which would make it impossible to lock them at the same time since we
use the ID to identify the lock. With a global sequence to generate the
IDs, the default workspace will now have a different ID for each project
and it will be possible to lock multiple unrelated projects at the same
time.

If an old version of Terraform tries to get the lock on a project created
with this new version it will work as we continue to use the ID of the
workspace, we just change the way we generate them.

If this version tries to get a lock on a project created by an old
version of Terraform it will work as usual, but we may encounter a
conflict with another unrelated project. This is already the current
behavior so it's not an issue to persist this behavior. As users migrate
to an up-to-date version of Terraform this will stop.

Projects already present in the database will keep their conflicting IDs,
I did not wanted to change them as users may be reading the states
directly in the database for some reason. They can if they want change
them manually to remove conflicts, newly created projects will work
without manual intervention.

Closes https://github.com/hashicorp/terraform/issues/22833
2020-11-15 14:54:57 +01:00
Martin Atkins b7f020bba1
Update CHANGELOG.md 2020-11-13 17:43:48 -08:00
Martin Atkins ca4b860902
Merge pull request #26766 from hashicorp/f-experimental-funcs
lang/funcs: Experimental "defaults" function
2020-11-13 17:41:06 -08:00
Martin Atkins cec4578005 lang/funcs: Experimental "defaults" function
This is a new part of the existing module_variable_optional_attrs
experiment, because it's intended to complement the ability to declare
an input variable whose type constraint is an object type with optional
attributes. Module authors can use this to replace null values (that were
either explicitly set or implied by attribute omission) with other
non-null values of the same type.

This function is a bit more type-fussy than our functions typically are
because it's intended for use primarily with input variables that have
fully-specified type constraints, and thus it uses that type information
to help inform how the defaults data structure should be interpreted.

Other uses of this function will probably be harder today because it takes
a lot of extra annotation to build a value of a specific type if it isn't
passing through a variable type constraint. Perhaps later language
features for more general type conversion will make this more applicable,
but for now the more general form of this problem is better solved other
ways.
2020-11-13 17:27:20 -08:00
Martin Atkins c8843642c8 lang: allow functions to be subject to experiments
So far all of our language experiments have been new constructs handled
statically up in the configs package, but functions are another common
extention point where experiments could be useful to gather feedback and
so this intends to pass the information down into the right place to allow
for that to happen, even though as of this commit there are no
experimental functions to use it.
2020-11-13 17:25:16 -08:00
Pam Selle 9f5f5adc0d
Merge pull request #26799 from flatiron32/patch-1
Remove redundant Local Named Values section
2020-11-13 11:39:33 -05:00
Pam Selle 5cab46de29
Merge pull request #26914 from hashicorp/update-go-getter
Update go-getter to v1.5.1 with support for vhost style S3 paths
2020-11-13 11:38:07 -05:00
Kent 'picat' Gruber 63cc597bc3
Fix grammar
Co-authored-by: Pam Selle <pam@hashicorp.com>
2020-11-13 11:28:13 -05:00
Kent 'picat' Gruber 20026819dd Remove path-style specific wording in module sources doc
Follow up on wording added in https://github.com/hashicorp/terraform/pull/20377
2020-11-13 11:15:06 -05:00
Kent 'picat' Gruber 1a30ef103c Update go-getter to v1.5.1 with support for vhost style S3 paths 2020-11-13 11:03:32 -05:00
Alisdair McDiarmid be263151e7
Update CHANGELOG.md 2020-11-12 10:03:18 -05:00
hhofs 5b99a56fde
communicator/ssh: Add support for Windows targets (#26865) 2020-11-12 10:00:48 -05:00
Nick Fagerlund 5e18e44037
Merge pull request #26723 from hashicorp/oct20_language_and_cli_docs
website: TF-153: Split core Terraform docs into "Language" and "CLI"
2020-11-11 19:31:05 -08:00
Nick Fagerlund 2c02233a16 website: Add new "glue"/overview pages for CLI and language docs
The new nav structure demanded a few new pages that give context about a feature
or workflow. In a few cases, they take text from an existing page.

Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
Co-authored-by: Judith Malnick <judith.patudith@gmail.com>
2020-11-11 19:13:23 -08:00
Nick Fagerlund d01faf1cb2 website: Remove unused "island" nav sidebars
The pages that used to use these isolated navs have been adopted into the new
unified nav sidebars.
2020-11-11 19:11:29 -08:00
Nick Fagerlund 8b87318b35 website: Add new Language sidebar, repurpose docs.erb as CLI sidebar
We're splitting the current Terraform CLI docs into two top-level categories,
and these are the new nav sidebars for those sections.

As of this commit, they refer to some new "glue" pages that don't exist yet.
2020-11-11 19:11:29 -08:00
James Bardin 495adb8115
Merge pull request #26886 from remilapeyre/update-libpq
Update libpq
2020-11-11 16:45:38 -05:00
Rémi Lapeyre c7be001a00 Update libpq
This is needed to make it possible to use the scram-sha-256
authentication method for the pg backend. It's not easy to write
unit-tests for this since it requires a specific configuration of the
PostgreSQL server, I did test it manually thought and everything seems
to work like it should.

Closes https://github.com/hashicorp/terraform/issues/24016
2020-11-11 22:31:24 +01:00
Martin Atkins 80b13307e8 website: Initial docs about the APT/Yum repositories
The HashiCorp engineering services team has set up APT and Yum
repositories as alternative installation methods for various HashiCorp
products, now including Terraform.

We don't really have a great place to talk about these in our current
website structure. There is a longer-term plan to revamp the downloads
page to include other options, but we are already getting lots of
questions about how to use these repositories and so my goal here is to
publish at least a first pass of documentation, linked from the Downloads
page sidebar as a placeholder for now, so we'll have somewhere to refer to
when answering such questions.

My intent is that even once we have a revamped Downloads page that
mentions these options more clearly, we'll still need to link out to
another page to talk about various details, and so the two new URLs this
creates would be the home of that content, even if we rewrite the specific
prose here to work better in the context of the new Downloads page.
2020-11-11 09:50:22 -08:00
Alisdair McDiarmid fce77f29da
Merge pull request #26871 from hashicorp/alisdair/fix-provider-lookup-local-name-mismatch
configs: Fix provider lookup local name mismatch
2020-11-11 10:16:34 -05:00
Andor Markus 9d3143381b
Update delete.html.md (#26874) 2020-11-11 10:14:54 -04:00
Alisdair McDiarmid 45671a354d configs: Fix provider lookup local name mismatch
When a resource has no `provider` argument specified, its provider is
derived from the implied provider type based on the resource type. For
example, a `boop_instance` resource has an implied provider local name
of `boop`. Correspondingly, its provider configuration is specified with
a `provider "boop"` block.

However, users can use the `required_providers` configuration to give a
different local name to a given provider than its defined type. For
example, a provider may be published at `foobar/beep`, but provide
resources such as `boop_instance`. The most convenient way to use this
provider is with a `required_providers` map:

terraform {
  required_providers {
    boop = {
      source = "foobar/beep"
    }
  }
}

Once that local name is defined, it is used for provider configuration
(a `provider "boop"` block, not `provider "beep"`). It should also be
used when looking up a resource's provider configuration or provider.

This commit fixes a bug with this edge case, where previously we were
looking up the local provider configuration block using the resource's
assigned provider type. Instead, if no provider argument is specified,
we should be using the implied provider type, as that is what binds the
resource to the local provider configuration.
2020-11-10 15:25:02 -05:00
Justin Campbell 7c98be92c2
website: Add Registry docs for webhooks (#26870) 2020-11-10 12:33:26 -05:00
Ben Drucker cd7d78968c move empty provider logic to node_provider 2020-11-09 16:27:17 -08:00
Ben Drucker 22440539c1 fix error output 2020-11-09 16:26:17 -08:00
Ben Drucker afe8b67b95 Merge remote-tracking branch 'origin/master' into validate-ignore-empty-provider
# Conflicts:
#	terraform/eval_validate.go
2020-11-09 16:24:49 -08:00
Robin Norwood ec7d9c85ac Update link to new varibles tutorial 2020-11-09 11:52:28 -08:00
James Bardin 5a2253e653
Merge pull request #26848 from hashicorp/jbardin/deps
update go-plugin and go-hclog
2020-11-09 08:31:14 -05:00
Radek Simko d011d0d507
Merge pull request #26836 from hashicorp/terraform-provider-descriptions
builtin/provider/terraform: Add field descriptions
2020-11-07 10:33:41 +00:00
James Bardin 5f76460294 update go-plugin and go-hclog 2020-11-06 16:38:26 -05:00
Alisdair McDiarmid 2d301f1fb3
Update CHANGELOG.md 2020-11-06 16:37:41 -05:00
Upo 3b9c5e5bbb
backend/gcs: remove deprecated "path" config argument (#26841) 2020-11-06 16:35:40 -05:00
Alisdair McDiarmid 4b58d62c54
Merge pull request #26844 from hashicorp/alisdair/update-output-command-docs
website: Update output command docs
2020-11-06 16:30:03 -05:00
Alisdair McDiarmid 3680bc521a website: Update output command docs
The example configuration now uses Terraform 0.12+ syntax, and the
output examples are up to date with the current text UI. We also add an
explicit recommendation to use the `-json` option for a consistent and
stable output format, for use in automation.
2020-11-06 15:10:31 -05:00
Alisdair McDiarmid 60e01f595c
Merge pull request #26761 from hashicorp/alisdair/compare-locks-and-provider-requirements
terraform: Compare locks and provider requirements
2020-11-06 13:12:26 -05:00
Alisdair McDiarmid 10cc25fc21 terraform: Compare locks and provider requirements
When building a context, we read the dependency locks and ensure that
the provider requirements from the configuration can be satisfied.
If the configured requirements change such that the locks need to be
updated, we explain this and recommend running "terraform init".

This check is ignored for any providers which are locally marked as in
development. This includes unmanaged providers and those listed in the
provider installation `dev_overrides` block.
2020-11-06 12:58:52 -05:00
Pam Selle e38e8e2e61
Merge pull request #26832 from hashicorp/pselle/validate-sensitive-output
Mark variables as sensitive (if relevant) in validate
2020-11-06 10:24:16 -05:00
Upo 4ccc63d79d
backend: Add service account impersonation to GCS Backend and update the docs (#26700) 2020-11-06 09:06:07 -05:00
Joshua Mendoza 27e31e1160
Update lookup.html.md (#26835)
Typo in introductory paragraph.
2020-11-06 09:58:33 -04:00
Radek Simko bc87be384b
builtin/provider/terraform: Add field descriptions 2020-11-06 08:51:07 +00:00
Pam Selle fd52bf21e8 Mark variables as sensitive (if relevant) in validate
Ensure that variables are marked in the validate walk
so that appropriate diags will surface at validate
rather than surprising users at apply
2020-11-05 16:09:10 -05:00
Pam Selle 61c4e49b11
Merge pull request #26827 from hashicorp/pselle/cty-mod
Update zclconf/go-cty dependency
2020-11-05 14:18:22 -05:00