hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.77k stars 9.13k forks source link

Newly added AWS region (af-south-1) is invalid when planning #12941

Closed p-v-z closed 4 years ago

p-v-z commented 4 years ago

AWS region Afica (Cape Town) af-south-1 was made available on 22 April 2020 and does not work with Terraform yet.

Community Note

Terraform Version

Terraform v0.12.24

Affected Resource(s)

Terraform Configuration Files

# Create a new instance of the latest Ubuntu 14.04 on an
# t2.micro node with an AWS Tag naming it "HelloWorld"
provider "aws" {
  region = "af-south-1"
}

data "aws_ami" "ubuntu" {
  most_recent = true

  filter {
    name   = "name"
    values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"]
  }

  filter {
    name   = "virtualization-type"
    values = ["hvm"]
  }

  owners = ["099720109477"] # Canonical
}

resource "aws_instance" "web" {
  ami           = "${data.aws_ami.ubuntu.id}"
  instance_type = "t2.micro"

  tags = {
    Name = "HelloWorld"
  }
}

Debug Output

Error: Invalid AWS Region: af-south-1

  on main.tf line 3, in provider "aws":
   3: provider "aws" {

Expected Behavior

Successful plan for resources in region 'af-south-1'

Actual Behavior

Unsuccessful plan with error

Steps to Reproduce

  1. terraform init
  2. terraform plan

Important Factoids

N/A

References

https://github.com/terraform-providers/terraform-provider-aws/issues/12940

bflad commented 4 years ago

Hi @Petrie65 šŸ‘‹ Thank you for submitting this. New regions require some slight updates in the provider to support natively. Please track #12940 for updates about this functionality and information about the skip_region_validation workaround in the meantime.

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ā³. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!