From 088c307c1f32b9c6bd745aec70e09eaa3d0bb6ef Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Mon, 16 Oct 2023 16:32:06 -0700 Subject: [PATCH 1/6] Updates documentation to indicate that changes to backend may require reconfiguring backend --- .../docs/language/settings/backends/s3.mdx | 3 ++ .../docs/language/upgrade-guides/index.mdx | 48 +++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/website/docs/language/settings/backends/s3.mdx b/website/docs/language/settings/backends/s3.mdx index 8836c20865..aed8ed20ff 100644 --- a/website/docs/language/settings/backends/s3.mdx +++ b/website/docs/language/settings/backends/s3.mdx @@ -16,6 +16,9 @@ A single DynamoDB table can be used to lock multiple remote state files. Terrafo [Bucket Versioning](https://docs.aws.amazon.com/AmazonS3/latest/userguide/manage-versioning-examples.html) on the S3 bucket to allow for state recovery in the case of accidental deletions and human error. +-> **Note:** Becuase of the changes to the S3 Backend in Terraform 1.6, you may need to run `terraform init -reconfigure`, +even if there have been no changes to your backend configuration. + ## Example Configuration ```hcl diff --git a/website/docs/language/upgrade-guides/index.mdx b/website/docs/language/upgrade-guides/index.mdx index 2bea65c7e9..924c946947 100644 --- a/website/docs/language/upgrade-guides/index.mdx +++ b/website/docs/language/upgrade-guides/index.mdx @@ -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) 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,50 @@ 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:** Becuase of these changes, you may need to run `terraform init -reconfigure`, +even if there have been no changes to your backend configuration. + +### 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: + +```hcl +terraform { + role_arn = "arn:aws:iam::123456789012:role/example" + session_name = "example-session" + assume_role_duration_seconds = 900 +} +``` + +The updated configuration is: + +```hcl +terraform { + assume_role { + role_arn = "arn:aws:iam::123456789012:role/example" + session_name = "example-session" + duration = "15m" + } +} +``` + +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`. \ No newline at end of file From e39a39ae53e62e539948e597764c19339ce6db87 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Tue, 17 Oct 2023 11:22:46 -0700 Subject: [PATCH 2/6] Fixes spelling --- website/docs/language/settings/backends/s3.mdx | 2 +- website/docs/language/upgrade-guides/index.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/language/settings/backends/s3.mdx b/website/docs/language/settings/backends/s3.mdx index aed8ed20ff..9ed2a844e7 100644 --- a/website/docs/language/settings/backends/s3.mdx +++ b/website/docs/language/settings/backends/s3.mdx @@ -16,7 +16,7 @@ A single DynamoDB table can be used to lock multiple remote state files. Terrafo [Bucket Versioning](https://docs.aws.amazon.com/AmazonS3/latest/userguide/manage-versioning-examples.html) on the S3 bucket to allow for state recovery in the case of accidental deletions and human error. --> **Note:** Becuase of the changes to the S3 Backend in Terraform 1.6, you may need to run `terraform init -reconfigure`, +-> **Note:** Because of the changes to the S3 Backend in Terraform 1.6, you may need to run `terraform init -reconfigure`, even if there have been no changes to your backend configuration. ## Example Configuration diff --git a/website/docs/language/upgrade-guides/index.mdx b/website/docs/language/upgrade-guides/index.mdx index 924c946947..0e861a4915 100644 --- a/website/docs/language/upgrade-guides/index.mdx +++ b/website/docs/language/upgrade-guides/index.mdx @@ -139,7 +139,7 @@ The `run` block also applies or plans the main configuration by default, there i 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:** Becuase of these changes, you may need to run `terraform init -reconfigure`, +-> **Note:** Because of these changes, you may need to run `terraform init -reconfigure`, even if there have been no changes to your backend configuration. ### Deprecations From 59b371cba0e046778e38f0c5342e2394c49515fa Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Tue, 17 Oct 2023 11:24:15 -0700 Subject: [PATCH 3/6] Fixes URL --- website/docs/language/upgrade-guides/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/language/upgrade-guides/index.mdx b/website/docs/language/upgrade-guides/index.mdx index 0e861a4915..3a0a2e6ba2 100644 --- a/website/docs/language/upgrade-guides/index.mdx +++ b/website/docs/language/upgrade-guides/index.mdx @@ -145,7 +145,7 @@ even if there have been no changes to your backend configuration. ### Deprecations The major deprecations are discussed here. -For more information, consult the [S3 Backend documentation](terraform/language/settings/backends/s3). +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: From 04ac7c571ddaa0e928661fb8e9849963e4318f44 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Fri, 20 Oct 2023 16:44:32 -0700 Subject: [PATCH 4/6] Fixes to documentation Co-authored-by: Jared Baker --- .../docs/language/upgrade-guides/index.mdx | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/website/docs/language/upgrade-guides/index.mdx b/website/docs/language/upgrade-guides/index.mdx index 3a0a2e6ba2..80336ea408 100644 --- a/website/docs/language/upgrade-guides/index.mdx +++ b/website/docs/language/upgrade-guides/index.mdx @@ -152,9 +152,12 @@ Previously, the configuration to assume the IAM role `arn:aws:iam::123456789012: ```hcl terraform { - role_arn = "arn:aws:iam::123456789012:role/example" - session_name = "example-session" - assume_role_duration_seconds = 900 + backend "s3" { + # additional configuration omitted for brevity + role_arn = "arn:aws:iam::123456789012:role/example" + session_name = "example-session" + assume_role_duration_seconds = 900 + } } ``` @@ -162,10 +165,13 @@ The updated configuration is: ```hcl terraform { - assume_role { - role_arn = "arn:aws:iam::123456789012:role/example" - session_name = "example-session" - duration = "15m" + backend "s3" { + # additional configuration omitted for brevity + assume_role = { + role_arn = "arn:aws:iam::123456789012:role/example" + session_name = "example-session" + duration = "15m" + } } } ``` From cf3d51665bc0bc89f9613f13677f693c6e507e07 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Tue, 24 Oct 2023 12:19:18 -0700 Subject: [PATCH 5/6] Removes references to reconfiguring backend --- website/docs/language/settings/backends/s3.mdx | 3 --- website/docs/language/upgrade-guides/index.mdx | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/website/docs/language/settings/backends/s3.mdx b/website/docs/language/settings/backends/s3.mdx index 9ed2a844e7..8836c20865 100644 --- a/website/docs/language/settings/backends/s3.mdx +++ b/website/docs/language/settings/backends/s3.mdx @@ -16,9 +16,6 @@ A single DynamoDB table can be used to lock multiple remote state files. Terrafo [Bucket Versioning](https://docs.aws.amazon.com/AmazonS3/latest/userguide/manage-versioning-examples.html) on the S3 bucket to allow for state recovery in the case of accidental deletions and human error. --> **Note:** Because of the changes to the S3 Backend in Terraform 1.6, you may need to run `terraform init -reconfigure`, -even if there have been no changes to your backend configuration. - ## Example Configuration ```hcl diff --git a/website/docs/language/upgrade-guides/index.mdx b/website/docs/language/upgrade-guides/index.mdx index 80336ea408..63581b7e6e 100644 --- a/website/docs/language/upgrade-guides/index.mdx +++ b/website/docs/language/upgrade-guides/index.mdx @@ -15,7 +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) +* [Deprecated parameters for the S3 backend](#s3-backend) 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 @@ -139,9 +139,6 @@ The `run` block also applies or plans the main configuration by default, there i 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. - ### Deprecations The major deprecations are discussed here. From 30928097eeeca6b7e3c200d9416e84def958fde9 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Tue, 24 Oct 2023 12:37:27 -0700 Subject: [PATCH 6/6] Updates deprecation documentation --- .../docs/language/upgrade-guides/index.mdx | 40 ++++++++++--------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/website/docs/language/upgrade-guides/index.mdx b/website/docs/language/upgrade-guides/index.mdx index 63581b7e6e..b69693e8e6 100644 --- a/website/docs/language/upgrade-guides/index.mdx +++ b/website/docs/language/upgrade-guides/index.mdx @@ -136,16 +136,16 @@ The `run` block also applies or plans the main configuration by default, there i ## 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. - -### Deprecations +We updated the S3 backend in Terraform 1.6.0 so that it more closely matches the AWS provider configuration. +As a result, the backend has new and deprecated fields. +Refer to the [release notes](https://github.com/hashicorp/terraform/releases/tag/v1.6.0) for additional information. The major deprecations are discussed here. -For more information, consult the [S3 Backend documentation](/terraform/language/settings/backends/s3). +Refer to the [S3 backend documentation](/terraform/language/settings/backends/s3) for information about all deprecations. + +We removed the configuration for assuming an IAM role from several top-level attributes and consolidated them into the `assume_role` attribute. -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: +The following example shows the configuration in Terraform 1.5.6 and older for assuming the IAM role `arn:aws:iam::123456789012:role/example` with a session name `example-session` and a session duration of 15 minutes: ```hcl terraform { @@ -158,7 +158,7 @@ terraform { } ``` -The updated configuration is: +The configuration in Terraform 1.6.0 is: ```hcl terraform { @@ -173,13 +173,17 @@ terraform { } ``` -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`. \ No newline at end of file +We removed the configuration for overriding AWS API endpoints from several top-level attributes and consolidated them into the `endpoints` attribute. +The following endpoint attributes are now nested under the `endpoint` attribute: + +- `s3` +- `dynamodb` +- `iam` +- `sts` + +The `endpoint` attribute replaces the following top-level attributes: + +- `endpoint` (for S3), +- `dynamodb_endpoint`, +- `iam_endpoint` +- `sts_endpoint`