Adding a Newly Released AWS Region#
New regions can typically be used immediately with the provider, with two important caveats:
- Regions often need to be explicitly enabled via the AWS console. See ap-east-1 launch blog for an example of how to enable a new region for use.
- Until the provider is aware of the new region, automatic region validation will fail. To use the region before validation support is added to the provider you will need to disable region validation by doing the following:
provider "aws" {
# ... potentially other configuration ...
region = "me-south-1"
skip_region_validation = true
}
Enabling Region Validation#
Support for region validation requires that the provider has an updated AWS SDK Go Base dependency that includes the new region. This also needs to be done in the core Terraform binary itself to enable it for the S3 backend. Many of the authentication and provider-level configuration interactions are also located in the aws-go-sdk-base
library. As all of these things take direct dependencies and as a result there end up being quite a few places where these dependency updates need to be made.
Update aws-go-sdk-base#
- Update aws-go-sdk-v2
Update Terraform AWS Provider#
- Update aws-go-sdk-v2
- Update aws-go-sdk-base
Update Terraform Core (S3 Backend)#
- Update aws-go-sdk-v2
- Update aws-go-sdk-base
See the Changelog Process document for example changelog format.
Update Region Specific values in static Data Sources#
Some data sources include static values specific to regions that are not available via a standard AWS API call. These will need to be manually updated. AWS employees can code search previous region values to find new region values in internal packages like RIPStaticConfig if they are not documented yet.
- Check Elastic Load Balancing endpoints and quotas and add Route53 Hosted Zone ID if available to
internal/service/elb/hosted_zone_id_data_source.go
andinternal/service/elbv2/hosted_zone_id_data_source.go
- Check Amazon Simple Storage Service endpoints and quotas and add Route53 Hosted Zone ID if available to
internal/service/s3/hosted_zones.go
- Check AWS Elastic Beanstalk endpoints and quotas and add Route53 Hosted Zone ID if available to
internal/service/elasticbeanstalk/hosted_zone_data_source.go
- Check SageMaker docs and add AWS Account IDs if available to
internal/service/sagemaker/prebuilt_ecr_image_data_source.go
- Check App Runner docs and add Route53 Hosted Zone ID if available to
internal/service/apprunner/hosted_zone_id_data_source.go