Skip to content
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

Transition to S3-native state locking and deprecate DynamoDB arguments #36257

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

bschaatsbergen
Copy link
Member

  • Removed experimental verbiage from use_lockfile, as S3-native state locking is now stable and no longer considered experimental.
  • Deprecated DynamoDB-related arguments, encouraging the use of S3-native state locking instead.
  • Improved documentation to better explain S3-native state locking and highlight the deprecation of DynamoDB-related state locking.

Copy link
Member

@jar-b jar-b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a typo and a couple small suggestions

@@ -33,7 +33,7 @@ Executing `terraform init -reconfigure` is required after updating to Terraform

### S3 Native State Locking

The S3 backend now supports S3 native state locking as an opt-in, experimental feature.
The S3 backend supports S3 native state locking as an opt-in feature.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page typically gets wiped and re-written by the core team before the formal minor release date. Perhaps we omit this for now and start a new entry once the other bits from core are added?


State locking is an opt-in feature of the S3 backend.

Locking can be enabled via an S3 or DynamoDB. However, **DynamoDB-based locking is deprecated** and will be removed in a future minor version. To support migration from older versions of Terraform that only support DynamoDB-based locking, the S3 and DynamoDB arguments can be configured simultaneously.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Locking can be enabled via an S3 or DynamoDB. However, **DynamoDB-based locking is deprecated** and will be removed in a future minor version. To support migration from older versions of Terraform that only support DynamoDB-based locking, the S3 and DynamoDB arguments can be configured simultaneously.
Locking can be enabled via S3 or DynamoDB. However, **DynamoDB-based locking is deprecated** and will be removed in a future minor version. To support migration from older versions of Terraform that only support DynamoDB-based locking, the S3 and DynamoDB arguments can be configured simultaneously.


### Credentials and Shared Configuration

!> **Warning:** We recommend using environment variables to supply credentials and other sensitive data. If you use `-backend-config` or hardcode these values directly in your configuration, Terraform will include these values in both the `.terraform` subdirectory and in plan files. Refer to [Credentials and Sensitive Data](/terraform/language/backend#credentials-and-sensitive-data) for details.

The following configuration is required:

* `region` - (Required) AWS Region of the S3 Bucket and DynamoDB Table (if used). This can also be sourced from the `AWS_DEFAULT_REGION` and `AWS_REGION` environment variables.
* `region` - (Required) AWS Region of the S3 Bucket and DynamoDB Table (if used, **deprecated**). This can also be sourced from the `AWS_DEFAULT_REGION` and `AWS_REGION` environment variables.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - I think the deprecation is covered well in other sections. Adding it here makes the sentence a bit harder to understand, so I'd propose reverting to the original syntax.

Suggested change
* `region` - (Required) AWS Region of the S3 Bucket and DynamoDB Table (if used, **deprecated**). This can also be sourced from the `AWS_DEFAULT_REGION` and `AWS_REGION` environment variables.
* `region` - (Required) AWS Region of the S3 Bucket and DynamoDB Table (if used). This can also be sourced from the `AWS_DEFAULT_REGION` and `AWS_REGION` environment variables.

}
```

Refer to the [AWS documentation on S3 access control](https://docs.aws.amazon.com/AmazonS3/latest/userguide/s3-access-control.html) for more details.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this link still be preserved after the example configuration that is now below?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants