Commit Graph

31188 Commits

Author SHA1 Message Date
Rose M Koron
66e3c20b18
Merge pull request #33274 from davendu/main
docs/backends/cos: add necessary permission list for using the backend
2023-06-16 10:35:18 -07:00
Daven Du
8b8a4c4a95
Apply suggestions from code review
Better expression.

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
2023-06-16 21:00:01 +08:00
James Bardin
1e6b2d0f6b
Merge pull request #33378 from hashicorp/jbardin/objchange-refinements
validate planned set sizes using refinements
2023-06-15 13:19:33 -04:00
James Bardin
f6c536e436 validate planned set sizes using refinements 2023-06-15 13:08:09 -04:00
James Bardin
0be4a381fc
Merge pull request #33377 from hashicorp/jbardin/nesting-set-length
objchange: set length is unknown with partially known elements
2023-06-15 10:26:24 -04:00
James Bardin
3c8a163583 set length is unknown with partially known elems
If a set contains partially known values the length is unknown which
causes assertPlannedObjectValid to fail valid plans.

Revert to the old method if using LengthInt for the set lengths, which
returns the maximum number of possible elements, with a guard for
entirely unknown set values.
2023-06-15 09:29:42 -04:00
Martin Atkins
8f6fd86ed8
Update CHANGELOG.md 2023-06-14 10:14:41 -07:00
Martin Atkins
237877f170 go.mod: go get github.com/hashicorp/terraform-svchost@v0.1.1
This includes a change to make svchost.Disco and the caching credentials
source both safe for concurrent calls.
2023-06-14 07:36:45 -07:00
Craig Wright
4c1349dd1a
Merge pull request #33346 from jpluscplusm/patch-1 2023-06-13 12:51:54 -07:00
Liam Cervante
5abaca4bbf
Update index.mdx (#33360) 2023-06-13 10:47:38 +02:00
Kieran Lowe
0a2f62c8a0
fix: update broken links to checks section in docs (#33357)
This also capitalises the 'a' in assertions to keep it consistent with the rest of the document
2023-06-13 10:35:49 +02:00
Liam Cervante
ce8fd2943d
[Testing Framework] Add test structure to views package for rendering test output (#33324)
* Add test structure to views package for rendering test output

* address comments
2023-06-13 10:09:20 +02:00
guimin.hgm
ce8790c939 backend/oss: Removes the deprecated warning for configuraion variable assume_role 2023-06-12 12:34:47 -07:00
Craig Wright
34c0e915dc
Merge pull request #33338 from Macaber/patch-1 2023-06-12 12:14:01 -07:00
Jonathan Matthews
43a8bc06f0
Update environment-variables.mdx 2023-06-12 10:32:53 +01:00
Liam Cervante
48c818927c Remove old implementation of terraform test command 2023-06-12 11:17:42 +02:00
Craig Wright
f6aaef4a89
Merge pull request #33341 from bit-nibble-byte/patch-1 2023-06-09 11:21:21 -07:00
bit-nibble-byte
a166716bd6
Add missing preposition to sentence 2023-06-09 11:20:11 -04:00
kmoe
991d6f3f1f
website: plannable import docs (#33266)
* website: plannable import docs

* website: config gen docs

* Update website/docs/cli/commands/plan.mdx

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* Update website/docs/cli/import/index.mdx

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* Update website/docs/language/import/index.mdx

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* Update website/docs/language/import/index.mdx

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* fix docs rendering

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* link again to import blocks

* fix genconfig example plan output

* Update website/docs/language/import/index.mdx

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* add import resource config example

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* attempt to fix nav

* more explicit

* fix build?

* remove pseudo tutorial

* add advice on when to gen

* add note on idempotency

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
Co-authored-by: Alan Szlosek Jr <alan.szlosek@hashicorp.com>

* refer to cli cmd in usual way

* more explanation for genconfig

* remove unnecessary sentence

* add heading

* update help text

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* update link

* add import ID section

* Apply suggestions from code review

Co-authored-by: rita <8647768+ritsok@users.noreply.github.com>
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: rita <8647768+ritsok@users.noreply.github.com>
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* dial back didacticism

* clarify genconfig instructions

* explicit explanation of arg conflict

* Apply suggestions from code review

Co-authored-by: rita <8647768+ritsok@users.noreply.github.com>
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* clarify import block required for genconfig

---------

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
Co-authored-by: Alan Szlosek Jr <alan.szlosek@hashicorp.com>
Co-authored-by: rita <8647768+ritsok@users.noreply.github.com>
2023-06-09 15:14:42 +01:00
Macaber
18655f1692
Update templatefile.mdx 2023-06-09 15:25:54 +08:00
Rose M Koron
46e47e07d9
Adding links to the Checks tutorial and fixing headers to be sentence case (#33328) 2023-06-09 08:58:43 +02:00
Craig Wright
51bedebb98
Merge pull request #33291 from Wasim101/patch-1 2023-06-08 11:48:32 -07:00
wasim
21f257a231
Update variables.mdx 2023-06-08 10:46:24 +05:30
Liam Cervante
6fa5784129
Add documentation page for checks and assertions (#33241)
* Add documentation page for checks and assertions

* address comments

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* address comments

* Apply suggestions from code review

Co-authored-by: Radek Simko <radek.simko@gmail.com>
Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* address comments

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* revamp choosing checks or other custom conditions section

* expand on depends_on

* fix issues link

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

* address comments

* Apply suggestions from code review

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>

---------

Co-authored-by: Rose M Koron <32436232+rkoron007@users.noreply.github.com>
Co-authored-by: Radek Simko <radek.simko@gmail.com>
2023-06-06 08:05:58 +02:00
Katy Moe
7ce5503c7a views: fix wordwrap 2023-06-05 14:53:37 +02:00
Liam Cervante
361d43c820
Ensure nested data blocks execute last of all Terraform resources (#33301)
* Ensure nested data blocks execute last of all Terraform resources

* add test, execute only during apply

* address comments
2023-06-02 17:35:34 +02:00
Bryce Kalow
c42e0ee89c
chore(docs): delete check-legacy-links-format.yml (#33300) 2023-06-01 09:31:06 -05:00
Martin Atkins
a0b3a2f49c
website: Terraform v1.5 upgrade guide (#33285)
There aren't any super significant upgrade considerations this time, so
this is really just a summary of the two main entries in the changelog.

There is also an entry in the changelog about ending support for older
versions of Windows, but in that case we are just passing on a release
note from Go itself and we already warned against using versions earlier
than Windows 10 back in Terraform v0.15 (since we are relying on the
Windows 10 console API) and so this is just one additional reason why
Terraform might not work correctly on those earlier versions of Windows,
so not worth mentioning in the upgrade guide here since our guidance
hasn't changed.
2023-05-31 21:00:09 +01:00
kmoe
5900d1177c
cloud: assert import block compatibility (#33282)
* cloud: assert import block compatibility

* check for import <> TFC compatibility during init

* imports are not in alphabetical order 🙃

---------

Co-authored-by: CJ Horton <cjhorton@hashicorp.com>
2023-05-31 20:55:35 +01:00
kmoe
4386a15684
command: help text for generate-config-out (#33279) 2023-05-31 20:42:41 +01:00
kmoe
1e31c671c2
terraform: expanded resources cannot genconfig (#33293)
This temporary measure prevents a panic further down the line when there is an unmatched expanded resource instance import target when running in config gen mode.
2023-05-31 20:25:15 +01:00
CJ Horton
8213513e2b
Merge pull request #33278 from hashicorp/radditude/cloud-config-generation
plannable import: allow writing generated config when using the cloud integration
2023-05-31 12:00:37 -07:00
CJ Horton
8a3f4e903b generating configuration is not allowed with the remote backend 2023-05-31 11:51:39 -07:00
Martin Atkins
1962b1167c go.mod: go get github.com/hashicorp/hcl/v2@v2.17.0
This introduces HCL's own updates to generate refinements for unknown
results from some operations.
2023-05-31 10:14:13 -07:00
Martin Atkins
a801ba45cb Build with Go 1.20.4
This minor release includes a number of security fixes and other small bug
fixes in the standard library and Go compiler.

The security fixes do not appear to involve functionality critical to
Terraform and so this is not an urgent upgrade, but still worth doing to
reset to a more recent baseline.
2023-05-31 08:37:34 -07:00
wasim
11b6f13024
Update variables.mdx
sentence correction
2023-05-31 10:01:42 +05:30
CJ Horton
6ca13bfc1e fix static check errors 2023-05-30 18:00:41 -07:00
CJ Horton
b705414d6b use newly released go-tfe 1.26.0 2023-05-30 17:25:23 -07:00
Brandon Croft
ea0ebcdc05
Merge pull request #33267 from hashicorp/sebasslash/snapshot-interval-header-check
[cloud] Add interval header check to enable snapshots
2023-05-30 12:41:32 -06:00
Brandon Croft
86eed095b3
Rename disableIntermediateSnapshots > enableIntermediateSnapshots 2023-05-30 12:35:23 -06:00
modrake
0d7c718263
build: go-version action no longer uses deprecated "set-output" mechanism
GitHub has deprecated this in favor of appending to a temporary file instead:
     https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
2023-05-30 11:32:12 -07:00
Martin Atkins
9f6a3ba701 build: Generate copyright headers automatically
HashiCorp legal now requires a copyright claim in a comment at the top of
every substantial file in this repository. If we don't add this ourselves
then a bot will open a PR to add missing entries, but that process adds
git history, pull request, and GitHub notification noise so instead we'll
deal with it proactively as part of our usual code generation steps.

This means that pull requests will fail their checks if there are any
files that lack copyright headers, so we can deal with those before we
merge rather than in a subsequent PR.
2023-05-30 08:21:40 -07:00
CJ Horton
cdce4c4a6d write generated config when using the cloud integration 2023-05-30 00:17:02 -07:00
CJ Horton
b88bae2ec4 tests for cloud backend config generation 2023-05-29 22:34:30 -07:00
davendu
ad84baf5ea docs/backends/cos: add necessary permission list for using the backend 2023-05-28 15:13:45 +08:00
Sebastian Rivera
d03fd37ee6 Add interval header check to enable snapshots 2023-05-26 15:01:05 -04:00
Martin Atkins
bc216caa65
Update CHANGELOG.md 2023-05-24 14:14:19 -07:00
Martin Atkins
b3f99cecb2
config: Refined Unknown Values
This introduces the "refinements" concept from upstream cty, which allows Terraform to track some additional information about unknown values that constrains their possible range even though we don't yet know the final value.
2023-05-24 14:11:04 -07:00
Martin Atkins
e0ef2748e6 docs: Describe the plugin protocol encoding of refined unknown values
This is actually a description of the "cty" library's encoding of refined
values, but from the perspective of the plugin protocol it's an
implementation detail that Terraform Core outsources that to a third-party
library, and current server-side implementations of the protocol use an
independent implementation of this format which will need to be compatible
with what cty does.
2023-05-24 13:48:16 -07:00
Martin Atkins
4c439b099f plans/objchange: Don't consider refinements when validating plans
Providers that existed prior to refinements (all of them, at the time of
writing) cannot preserve refinements sent in unknown values in the
configuration, and even if one day providers _are_ aware of refinements
there we might add new ones that existing providers don't know how to
handle.

For that reason we'll absolve providers of the responsibility of
preserving refinements from config into plan by fixing some cases where
we were incorrectly using RawEquals to compare values; that function isn't
appropriate for comparing values that might be unknown.

However, to avoid a disruptive change right now this initial fix just
strips off the refinements before comparing. Ideally this should be using
Value.Equals and handling unknown values more explicitly, but we'll save
that for a possible later improvement.

This does not include a similar exception for validating whether a final
value conforms to a plan because the plan value and the final value are
both produced by the same provider and so providers ought to be able to
be consistent with their _own_ treatment of refinements, if any.
Configuration is special because Terraform itself generates that, and so
it can potentially contain refinements that a particular provider has no
awareness of.
2023-05-24 13:48:13 -07:00