Terraform 1.6.5 repairs S3 backend authentication dependencies
Terraform's S3 backend inherits credential parsing and SSO endpoint behavior from its AWS dependencies. Version 1.6.5 updates those dependencies to repair two authentication failures.
Terraform can fail to reach its state before it asks a provider to manage any infrastructure. The S3 backend has its own AWS client and credential configuration, so a provider that authenticates successfully does not prove that the backend can do the same. Terraform 1.6.5, released on November 29, repairs shared configuration and credentials parsing, plus AWS SSO failures when FIPS endpoints are enabled.
Both fixes arrive through updates to the backend's dependencies. The release does not add a new resource argument to an AWS provider. Its subject is the client implementation compiled into Terraform for reading and writing remote state. That distinction determines which executable needs updating when the affected authentication path fails.
I value Terraform's common configuration model, but a working deployment involves more than the provider graph. State storage is a separate dependency with its own access requirements. Its authentication behavior needs to be understood independently of the credentials used by the resources in the configuration.
The backend has a separate client implementation
Terraform 1.6 changed the S3 backend to use AWS SDK for Go v2. The 1.6 release changelog also introduced shared configuration-file arguments and support for standard AWS environment variables that identify those files. These changes brought backend configuration closer to the AWS provider's capabilities without making the backend part of that provider.
The 1.6.5 dependency patch updates aws-sdk-go-base/v2 from v2.0.0-beta.40 to v2.0.0-beta.43. It also updates AWS SDK modules, including shared configuration and credentials packages. The pull request identifies the upstream parsing and SSO-with-FIPS corrections as the purpose of the update.
The patch is useful evidence about where the behavior lives. Most of the change concerns module versions and checksums, with small adaptations to SDK interfaces. The credential-file parser is not reimplemented inside a new Terraform resource. Terraform receives the corrected behavior by compiling against the updated dependencies.
This explains why selecting a newer hashicorp/aws provider alone cannot replace the backend's parser. Provider package selection controls a separately installed plugin. The backend implementation comes with Terraform CLI. Two parts of a deployment can use similar AWS configuration concepts while shipping their implementations through different release mechanisms.
Shared configuration names its own inputs
The S3 backend documentation at 1.6.5 defines profile, shared_config_files, and shared_credentials_files. The plural arguments accept lists of paths. Its singular credentials-file argument remains documented but deprecated in favor of the plural form. A profile can also come from AWS_PROFILE.
For a backend whose bucket already exists, the configuration can identify the state location and profile explicitly. The following names are illustrative, and the bucket and profile must exist in the actual environment.
terraform {
backend "s3" {
bucket = "example-terraform-state"
key = "network/terraform.tfstate"
region = "us-east-1"
profile = "infrastructure"
}
}
The profile selects credential or configuration information independently of a provider block elsewhere in the module. Shared-file parsing must complete before the backend can use that information. A parsing failure is therefore different from AWS rejecting a request made with successfully loaded credentials.
That difference affects the interpretation of errors. Changing an IAM policy cannot repair a parser that fails to read its input. Similarly, replacing a resource's provider configuration does not establish which profile the backend selected. The concrete credential source and failing component matter more than a general description that Terraform cannot authenticate.
FIPS selection affects credential acquisition too
The backend supports use_fips_endpoint, with corresponding environment and shared-configuration settings. Its endpoint configuration also includes an SSO override, added in 1.6.4. The 1.6.5 changelog distinguishes that earlier capability from today's correction for SSO used with FIPS endpoints.
An S3 backend using SSO depends on credential acquisition as well as eventual access to the state object. Endpoint selection can therefore matter before an S3 request succeeds. Today's release fixes the documented combination without implying that an SSO endpoint override is required for every configuration or that FIPS selection should be disabled.
I prefer keeping these controls explicit in the backend's documented configuration. A service endpoint and an identity endpoint serve different requests. Treating them as one generic AWS connection obscures which client needs the corrected behavior and which setting influences it.
The backend still needs permission to access its bucket and state key. If DynamoDB locking is configured, it needs the corresponding table access as well. The authentication fixes do not grant those permissions or create the backing resources. Their effect is to repair the dependency paths used to read shared settings and acquire credentials, allowing valid configurations to proceed to the state operations they were intended to perform.