Skip to content

Commit 6cfb6df

Browse files
author
Liam Cervante
committed
backport of commit c196aa2
1 parent 19e00c2 commit 6cfb6df

File tree

385 files changed

+4012
-34817
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

385 files changed

+4012
-34817
lines changed

.copywrite.hcl

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/workflows/check-legacy-links-format.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.20.0
1+
1.19.6

CHANGELOG.md

Lines changed: 93 additions & 18 deletions
Large diffs are not rendered by default.

docs/maintainer-etiquette.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Maintainer's Etiquette
2+
3+
Are you a core maintainer of Terraform? Great! Here's a few notes
4+
to help you get comfortable when working on the project.
5+
6+
This documentation is somewhat outdated since it still includes provider-related
7+
information even though providers are now developed in their own separate
8+
codebases, but the general information is still valid.
9+
10+
## Expectations
11+
12+
We value the time you spend on the project and as such your maintainer status
13+
doesn't imply any obligations to do any specific work.
14+
15+
### Your PRs
16+
17+
These apply to all contributors, but maintainers should lead by examples! :wink:
18+
19+
- for `provider/*` PRs it's useful to attach test results & advise on how to run the relevant tests
20+
- for `bug` fixes it's useful to attach repro case, ideally in a form of a test
21+
22+
### PRs/issues from others
23+
24+
- you're welcomed to triage (attach labels to) other PRs and issues
25+
- we generally use 2-label system (= at least 2 labels per issue/PR) where one label is generic and other one API-specific, e.g. `enhancement` & `provider/aws`
26+
27+
## Merging
28+
29+
- you're free to review PRs from the community or other HC employees and give :+1: / :-1:
30+
- if the PR submitter has push privileges (recognizable via `Collaborator`, `Member` or `Owner` badge) - we expect **the submitter** to merge their own PR after receiving a positive review from either HC employee or another maintainer. _Exceptions apply - see below._
31+
- we prefer to use the GitHub's interface or API to do this, just click the green button
32+
- squash?
33+
- squash when you think the commit history is irrelevant (will not be helpful for any readers in T+6months)
34+
- Add the new PR to the **Changelog** if it may affect the user (almost any PR except test changes and docs updates)
35+
- we prefer to use the GitHub's web interface to modify the Changelog and use `[GH-12345]` to format the PR number. These will be turned into links as part of the release process. Breaking changes should be always documented separately.
36+
37+
## Release process
38+
39+
- HC employees are responsible for cutting new releases
40+
- The employee cutting the release will always notify all maintainers via Slack channel before & after each release
41+
so you can avoid merging PRs during the release process.
42+
43+
## Exceptions
44+
45+
Any PR that is significantly changing or even breaking user experience cross-providers should always get at least one :+1: from a HC employee prior to merge.
46+
47+
It is generally advisable to leave PRs labelled as `core` for HC employees to review and merge.
48+
49+
Examples include:
50+
- adding/changing/removing a CLI (sub)command or a [flag](https://github.com/hashicorp/terraform/pull/12939)
51+
- introduce a new feature like [Environments](https://github.com/hashicorp/terraform/pull/12182) or [Shadow Graph](https://github.com/hashicorp/terraform/pull/9334)
52+
- changing config (HCL) like [adding support for lists](https://github.com/hashicorp/terraform/pull/6322)
53+
- change of the [build process or test environment](https://github.com/hashicorp/terraform/pull/9355)
54+
55+
## Breaking Changes
56+
57+
- we always try to avoid breaking changes where possible and/or defer them to the nearest major release
58+
- [state migration](https://github.com/hashicorp/terraform/blob/2fe5976aec290f4b53f07534f4cde13f6d877a3f/helper/schema/resource.go#L33-L56) may help you avoid breaking changes, see [example](https://github.com/hashicorp/terraform/blob/351c6bed79abbb40e461d3f7d49fe4cf20bced41/builtin/providers/aws/resource_aws_route53_record_migrate.go)
59+
- either way BCs should be clearly documented in special section of the Changelog
60+
- Any BC must always receive at least one :+1: from HC employee prior to merge, two :+1:s are advisable
61+
62+
### Examples of Breaking Changes
63+
64+
- https://github.com/hashicorp/terraform/pull/12396
65+
- https://github.com/hashicorp/terraform/pull/13872
66+
- https://github.com/hashicorp/terraform/pull/13752
67+
68+
## Unsure?
69+
70+
If you're unsure about anything, ask in the committer's Slack channel.
71+
72+
## New Providers
73+
74+
These will require :+1: and some extra effort from HC employee.
75+
76+
We expect all acceptance tests to be as self-sustainable as possible
77+
to keep the bar for running any acceptance test low for anyone
78+
outside of HashiCorp or core maintainers team.
79+
80+
We expect any test to run **in parallel** alongside any other test (even the same test).
81+
To ensure this is possible, we need all tests to avoid sharing namespaces or using static unique names.
82+
In rare occasions this may require the use of mutexes in the resource code.
83+
84+
### New Remote-API-based provider (e.g. AWS, Google Cloud, PagerDuty, Atlas)
85+
86+
We will need some details about who to contact or where to register for a new account
87+
and generally we can't merge providers before ensuring we have a way to test them nightly,
88+
which usually involves setting up a new account and obtaining API credentials.
89+
90+
### Local provider (e.g. MySQL, PostgreSQL, Kubernetes, Vault)
91+
92+
We will need either Terraform configs that will set up the underlying test infrastructure
93+
(e.g. GKE cluster for Kubernetes) or Dockerfile(s) that will prepare test environment (e.g. MySQL)
94+
and expose the endpoint for testing.
95+

docs/resource-instance-change-lifecycle.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,9 @@ The various object values used in different parts of this process are:
3333
which a provider may use as a starting point for its planning operation.
3434

3535
The built-in logic primarily deals with the expected behavior for attributes
36-
marked in the schema as "computed". If an attribute is only "computed",
37-
Terraform expects the value to only be chosen by the provider and it will
38-
preserve any Prior State. If an attribute is marked as "computed" and
39-
"optional", this means that the user may either set it or may leave it
40-
unset to allow the provider to choose a value.
36+
marked in the schema as both "optional" _and_ "computed", which means that
37+
the user may either set it or may leave it unset to allow the provider
38+
to choose a value instead.
4139

4240
Terraform Core therefore constructs the proposed new state by taking the
4341
attribute value from Configuration if it is non-null, and then using the

go.mod

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ require (
4545
github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f
4646
github.com/hashicorp/hcl/v2 v2.16.2
4747
github.com/hashicorp/jsonapi v0.0.0-20210826224640-ee7dae0fb22d
48+
github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
4849
github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c
4950
github.com/hashicorp/terraform-svchost v0.1.0
5051
github.com/jmespath/go-jmespath v0.4.0
@@ -81,7 +82,7 @@ require (
8182
github.com/zclconf/go-cty-yaml v1.0.3
8283
golang.org/x/crypto v0.1.0
8384
golang.org/x/mod v0.8.0
84-
golang.org/x/net v0.7.0
85+
golang.org/x/net v0.6.0
8586
golang.org/x/oauth2 v0.4.0
8687
golang.org/x/sys v0.5.0
8788
golang.org/x/term v0.5.0
@@ -93,7 +94,7 @@ require (
9394
google.golang.org/grpc v1.50.1
9495
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0
9596
google.golang.org/protobuf v1.28.1
96-
honnef.co/go/tools v0.4.2
97+
honnef.co/go/tools v0.3.0
9798
k8s.io/api v0.23.4
9899
k8s.io/apimachinery v0.23.4
99100
k8s.io/client-go v0.23.4
@@ -114,7 +115,7 @@ require (
114115
github.com/Azure/go-autorest/logger v0.2.1 // indirect
115116
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
116117
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect
117-
github.com/BurntSushi/toml v1.2.1 // indirect
118+
github.com/BurntSushi/toml v0.4.1 // indirect
118119
github.com/ChrisTrenkamp/goxpath v0.0.0-20190607011252-c5096ec8773d // indirect
119120
github.com/Masterminds/goutils v1.1.1 // indirect
120121
github.com/Masterminds/semver/v3 v3.1.1 // indirect
@@ -175,7 +176,7 @@ require (
175176
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
176177
github.com/vmihailenco/tagparser v0.1.1 // indirect
177178
go.opencensus.io v0.23.0 // indirect
178-
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect
179+
golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect
179180
golang.org/x/time v0.3.0 // indirect
180181
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
181182
google.golang.org/appengine v1.6.7 // indirect

0 commit comments

Comments
 (0)