Commit Graph

29219 Commits

Author SHA1 Message Date
tombuildsstuff
a2cad7d579 internal/backend/remote-state/azure: prefixing the existing tests with ADAL 2021-11-17 18:43:39 +01:00
tombuildsstuff
bf6c7c0381 go mod tidy/vendor: hamilton is now directly used 2021-11-17 18:42:53 +01:00
tombuildsstuff
9f710558ce internal/backend/remote-state/azure: adding a feature-toggle to use MSAL 2021-11-17 18:42:01 +01:00
tombuildsstuff
27a34d6c2c internal/backend/remote-state/azure: updating the link to the client secret
This redirects to the registry so we should point there directly
2021-11-17 18:28:47 +01:00
tombuildsstuff
0272249f47 go mod vendor/go mod tidy 2021-11-17 18:27:55 +01:00
tombuildsstuff
5133d30b71 internal/backend/remote-state/azure: code changes for go-azure-helpers v0.18.0 2021-11-17 18:26:23 +01:00
tombuildsstuff
cf56f42328 dependencies: upgrading to v0.18.0 of github.com/hashicorp/go-azure-helpers 2021-11-17 18:23:54 +01:00
James Bardin
0045e71676
Merge pull request #29953 from hashicorp/jbardin/k8s-mod-update
Remove retracted k8s package
2021-11-16 15:01:58 -05:00
Jared Ledvina
61a5808680 k8s-backend - Initial context support for library update
Signed-off-by: Jared Ledvina <jared.ledvina@datadoghq.com>
2021-11-16 14:43:50 -05:00
James Bardin
ac52f5135a update k8s packages from retracted module
Use the latest k8s.io packages from v0.21
2021-11-16 14:42:06 -05:00
Barrett Clark
02aacb09e6
Merge pull request #29863 from hashicorp/barrettclark/migrate-empty-default-workspace
Cloud: Migrate empty default workspace prompt
2021-11-16 13:27:39 -06:00
Barrett Clark
a146a2746e Add clarifying commend and e2e test
This pull request focuses on removing the prompt to rename the default
workspace when it is empty. Functionality already exists to not migrate
an empty workspace. This commit adds some clarifying language in the
comment where we do the evaluation to know whether to ask for a new name
or not. I also added an end to end test, which I should have added to
begin with.
2021-11-16 13:05:26 -06:00
kmoe
18ab3512fa
Merge pull request #29943 from hashicorp/kmoe/moved-block-resource-type
refactoring: error when changing resource type during move
2021-11-16 18:25:27 +00:00
Katy Moe
aeecc6a627
add AffectedAbsResource to interface 2021-11-16 18:19:11 +00:00
Barrett Clark
a9eb62d692 Cloud: Migrate empty default workspace prompt
Given: You have multiple explicit local workspaces, and the `default`
workspace is empty.
When: You migrate the workspaces to Terraform Cloud.
Then: Terraform should _not_ ask for a workspace to migrate the
`default` workspace to in Terraform Cloud.
2021-11-16 10:33:46 -06:00
James Bardin
db9109d2ce
Merge pull request #29926 from simaotwx/patch-1
funcs: defer close file in filesha256
2021-11-16 08:38:20 -05:00
Simão Gomes Viana
5bbd108572
funcs: defer close file in funcs
Files opened by these two functions were not being closed,
leaking file descriptors. Close files that were opened when the
function exist.
2021-11-16 09:25:49 +01:00
Barrett Clark
388c430ece
Merge pull request #29883 from hashicorp/barrettclark/cloud-e2e-tests
Cloud: Make e2e Tests Less Chatty, and More Stable
2021-11-15 10:45:14 -06:00
Laura Pacilio
7e41803418
Merge pull request #29891 from hashicorp/update-for-each-example
Add cidr block output example to setproduct function page
2021-11-15 11:17:27 -05:00
Laura Pacilio
bd64d07e6b Apply suggestions from code review 2021-11-15 10:49:37 -05:00
Omar Ismail
9b675f8b70 Add skip for cloud e2e tests when env vars missing 2021-11-15 10:36:19 -05:00
Chris Arcand
bf76cc98ef command: Suggestions on migration copy from user feedback
Some small edits to the TFC migration copy.
2021-11-15 09:21:31 -06:00
Katy Moe
11566b1d11
introduce AbsMoveableResource
AbsMoveableResource is an AbsMoveable that is either a resource or a resource
instance. This interface represents a moveable that has a resource type.
2021-11-15 11:05:33 +00:00
Katy Moe
7162e79fdf
return error on resource type mismatch
A resource move is invalid if the two resource( instance)s are of different
resource types. Check for this during move validation.
2021-11-15 11:05:33 +00:00
Katy Moe
dc3ed6271c
add failing test for resource type mismatch 2021-11-15 11:05:33 +00:00
Katy Moe
4305271cff
remove occurrences of AbsMovable 2021-11-15 11:05:33 +00:00
Katy Moe
1dabdf0dcd
normalise test names 2021-11-14 21:51:53 +00:00
James Bardin
33bcc715a0
Merge pull request #29928 from hashicorp/jbardin/ignore_null_map
`ignore_changes` converting null maps to empty maps, and applying marks.
2021-11-12 14:32:31 -05:00
Omar Ismail
57a4b51e87 remove build tags for cloud e2e 2021-11-11 16:33:26 -05:00
Barrett Clark
5ef82ddd2f Cloud: fix e2e tests
- Fix tests and remove commented code
- Remove parallel for some flaky tests
- Add README
2021-11-11 14:37:21 -05:00
Brandon Croft
e07a7c472b
Merge pull request #29913 from hashicorp/brandonc/run_variables_types
fix(run variables): support all variable types (map, list, bool, number, null, string)
2021-11-11 10:56:36 -07:00
Brandon Croft
1f01ba4dbc
fix(run variables): support all variable types (map, list, bool, number, null, string)
All run variables remain encoded as strings in the API but will now be expressed as an HCL value to be evaluated correctly by the remote terraform. Previously, only strings were supported.

Examples:
string: `"quoted literal"` (strings must be quoted)
map:  `{ foo = "bar" }`
list: `["foo", "bar"]`
bool: `true`
null: `null`
number: `0.0001`

This requires the API to anticipate that all run variables will be HCL values
2021-11-11 10:36:01 -07:00
Brandon Croft
9441666d9a
Merge pull request #29903 from hashicorp/pull-mock-gotfe-changes
Pull changes made to mocks in go-tfe
2021-11-11 10:12:09 -07:00
Brandon Croft
051bf5df7e
update to go-tfe@tfc-integration 2021-11-11 09:57:23 -07:00
James Bardin
9d19086c8e test for null map and fix lost map marks
Add a test to ensure ignore_changes does not change null maps to empty
maps.

Fix when a marked map revers the changes ignored within that map.
2021-11-11 10:44:39 -05:00
James Bardin
40174b634a ignore_changes changing a null map to empty
Fix an error where using `ignore_changes` would cause some null maps to
be saved as an empty map.
2021-11-11 10:44:05 -05:00
kmoe
64635edfb9
Merge pull request #29885 from hashicorp/kmoe/more-init-interrupts
command: make module installation interruptible
2021-11-11 12:37:49 +00:00
Katy Moe
6da61bf07b
revert change to installModules diag handling
Error diags from c.installModules() no longer cause getModules() to exit early.
Whether installModules completed successfully, errored, or was cancelled, we
try to update the manifest as best we can, preferring incomplete information
to none.
2021-11-11 12:28:16 +00:00
Katy Moe
7022876494
bump go-getter to v1.5.9 2021-11-11 12:28:16 +00:00
kmoe
40ec62c139
command: make module installation interruptible
Earlier work to make "terraform init" interruptible made the getproviders
package context-aware in order to allow provider installation to be cancelled.

Here we make a similar change for module installation, which is now also
cancellable with SIGINT. This involves plumbing context through initwd and
getmodules. Functions which can make network requests now include a context
parameter whose cancellation cancels those requests.

Since the module installation code is shared, "terraform get" is now
also interruptible during module installation.
2021-11-11 12:28:10 +00:00
Krista LaFentres (she/her)
385a3ba879
Merge pull request #29892 from hashicorp/lafentres/warn-about-backups-on-non-local-backends
Command state mv: Error when backup or backup-out options are used without the state option on non-local backends
2021-11-10 13:15:17 -06:00
Krista LaFentres
a62cff939e Update documentation for state mv command to clarify use of backup and backup-out options 2021-11-09 13:09:36 -06:00
Krista LaFentres
c44c589f0a Error if backup or backup-out options are used without the state option on non-local backends for the state mv command 2021-11-09 13:09:36 -06:00
Chris Arcand
21750037d5 cloud: Help output typos 2021-11-08 22:07:37 -06:00
uturunku1
9ef9f97121 pull go tfe changes from main branch 2021-11-08 09:03:05 -08:00
uturunku1
58304b678c import path to go mocks in tfe 2021-11-08 08:58:56 -08:00
Luces Huayhuaca
4e3218b4d5
cloud: convert uses of worspaces.operations into workspaces.executionMode (#29844)
* convert uses of worspaces.operations into workspaces.executionMode

The cloud package currently uses a deprecated API on workspaces to determine a workspace's execution mode.

Deprecated: Operations (boolean)
New hotness: Execution mode (string - "local", "remote", or "agent")

More details: https://www.terraform.io/docs/cloud/api/workspaces.html#request-body

All uses of Operations field coming from the client (within the cloud package) should be converted to the appropriate ExecutionMode equivalent.
Also, we need to update all acknowledgment of operations field on the tests that are testing the behavior of workspaces.

Co-authored-by: Nick Fagerlund <nick.fagerlund@gmail.com>

Co-authored-by: Nick Fagerlund <nick.fagerlund@gmail.com>
2021-11-08 07:20:15 -08:00
Martin Atkins
5ac1074c54 main: Report version information for "interesting" dependencies
We have a few dependencies that are such a significant part of Terraform's
behavior that they will often be the root cause of or the solution to a
bug reported against Terraform.

As a small quality-of-life improvement to help with diagnosing those,
we'll now report the selected versions for each of these so-called
"interesting" dependencies as part of our initial trace log output during
Terraform startup.

The goal here is that when someone opens a bug report, and includes the
trace log as our bug report template requests, we'll be able to see at a
glance which versions of these dependencies were involved, instead of
having to manually cross-reference in the go.mod file of the reported main
Terraform CLI version.

This does slightly grow the general overhead of the logs, but as long as
we keep this set of interesting dependencies relatively small it shouldn't
present any significant problem in typical usage.
2021-11-05 16:47:38 -07:00
Laura Pacilio
19101df1d4
Merge pull request #29887 from strugee/patch-1
Fix typo in 0.13 upgrade guide
2021-11-05 11:08:05 -04:00
Laura Pacilio
b838a93023 Add cidr block output example to setproduct function page 2021-11-05 10:51:59 -04:00