-
Notifications
You must be signed in to change notification settings - Fork 10.3k
backend/s3: Document need to reconfigure backend when updating Terraform #34098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
088c307
Updates documentation to indicate that changes to backend may require…
gdavison e39a39a
Fixes spelling
gdavison 59b371c
Fixes URL
gdavison 04ac7c5
Fixes to documentation
gdavison cf3d516
Removes references to reconfiguring backend
gdavison 3092809
Updates deprecation documentation
gdavison File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ but there are some behavior changes outside of those promises that may affect a | |
| small number of users. Specifically, the following updates may require | ||
| additional upgrade steps: | ||
| * [End of experimental period for `terraform test`](#terraform-test) | ||
| * [S3 Backend may need to be reconfigured](#s3-backend) | ||
gdavison marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| See [the full changelog](https://github.com/hashicorp/terraform/blob/v1.6/CHANGELOG.md) | ||
| for more details. If you encounter any problems during upgrading which are not | ||
|
|
@@ -132,3 +133,56 @@ run "test_defaults" { | |
| The above examples demonstrates the differences in layout, scope and access between the two approaches. In the experimental framework, access is granted as if the configuration was being called like a normal module call. In the released framework, assertions execute as if they are custom conditions defined within the main configuration directly. | ||
|
|
||
| The `run` block also applies or plans the main configuration by default, there is no need for the specific module call seen in the experimental framework. | ||
|
|
||
| ## S3 Backend | ||
|
|
||
| The S3 Backend has been updated, with a number of added and deprecated fields. | ||
| These changes bring the S3 Backend configuration closer to the AWS Provider configuration. | ||
|
|
||
| -> **Note:** Because of these changes, you may need to run `terraform init -reconfigure`, | ||
| even if there have been no changes to your backend configuration. | ||
gdavison marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ### Deprecations | ||
|
|
||
| The major deprecations are discussed here. | ||
| For more information, consult the [S3 Backend documentation](/terraform/language/settings/backends/s3). | ||
|
|
||
| Configuration for assuming an IAM Role has been moved from a number of top-level attributes into the attribute `assume_role`. | ||
| Previously, the configuration to assume the IAM role `arn:aws:iam::123456789012:role/example` with a session name `example-session` and a session duration of 15 minutes was: | ||
gdavison marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ```hcl | ||
| terraform { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this example show backend S3 block? terraform {
backend "s3" {
assume_role {
role_arn = "arn:aws:iam::123456789012:role/example"
session_name = "example-session"
duration = "15m"
}
}
}
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, good catch |
||
| backend "s3" { | ||
| # additional configuration omitted for brevity | ||
| role_arn = "arn:aws:iam::123456789012:role/example" | ||
| session_name = "example-session" | ||
| assume_role_duration_seconds = 900 | ||
| } | ||
| } | ||
gdavison marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| The updated configuration is: | ||
|
|
||
| ```hcl | ||
| terraform { | ||
| backend "s3" { | ||
| # additional configuration omitted for brevity | ||
| assume_role = { | ||
| role_arn = "arn:aws:iam::123456789012:role/example" | ||
| session_name = "example-session" | ||
| duration = "15m" | ||
| } | ||
| } | ||
| } | ||
gdavison marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| The AWS API endpoint override attributes | ||
| `endpoint` (for S3), | ||
| `dynamodb_endpoint`, | ||
| `iam_endpoint`, and | ||
| `sts_endpoint` | ||
| have been replaced with the attributes `endpoints` and the corresponding nested attributes | ||
| `s3`, | ||
| `dynamodb`, | ||
| `iam`, and | ||
| `sts`. | ||
gdavison marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.