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.76k stars 9.12k forks source link

UnsupportedOperation: The functionality you requested is not available in this region #4359

Closed jordan-huangwei closed 6 years ago

jordan-huangwei commented 6 years ago

Terraform Version

Terraform v0.11.6 provider.aws v1.16.0

Affected Resource(s)

aws_instance_ec2

Terraform Configuration Files

module "docdb" { source = "../../../../../../tradeshift-puppet/terraform/modules/aws/instances-cn/riak" environment = "${var.pull_request}" stackname = "${var.stackname}" role = "docdb" owner = "${var.owner}" decomission_date = "${var.decomission_date}" instance_type = "t2.large" instance_ami = "${module.regional-common.base_ami_1604}" instance_key_name = "${module.regional-common.key_name}" disable_api_termination = false ebs_volume_size = "100" ebs_delete_on_termination = "false" ebs_optimized = false vpc_security_groups = "${data.terraform_remote_state.security_groups.stack_it_run_access_sg_id}" vpc_subnets = "${data.terraform_remote_state.vpc.private_subnets}" postfix = ".${var.stackname}" dns_region_name = "${module.regional-common.region_dns}" disk_encryption_key = "dr69ZUGVm0Ep1Eo/xBoOTcefuKVx" count = "1" cert_name = "${module.environment-common.cert_name}" }

Debug Output

2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: ---[ RESPONSE ]--------------------------------------
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: HTTP/1.1 200 OK
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Connection: close
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Transfer-Encoding: chunked
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Content-Type: text/xml;charset=UTF-8
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Date: Thu, 26 Apr 2018 11:00:36 GMT
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Server: AmazonEC2
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Vary: Accept-Encoding
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4:
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4:
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: -----------------------------------------------------
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: 2018/04/26 19:00:36 [DEBUG] [aws-sdk-go] <?xml version="1.0" encoding="UTF-8"?>
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: <DescribeInstanceAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/">
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4:     <requestId>35e6cd4e-cb70-4016-a250-53f0880cc9be</requestId>
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4:     <instanceId>i-022a9894321a6d374</instanceId>
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4:     <userData>
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4:         <value>I2Nsb3VkLWNvbmZpZwptb3VudHM6CiAtIFtlcGhlbWVyYWwwLCBudWxsXQoKcHJlc2VydmVfaG9zdG5hbWU6IHRydWUKbWFuYWdlX2V0Y19ob3N0czogZmFsc2UKCmJvb3RjbWQ6CiAtICJlY2hvIHBheSA+IC9ldGMvdHJhZGVzaGlmdC9zdGFja25hbWUiCiAtICJlY2hvIGRvY2RiLSRJTlNUQU5DRV9JRCA+IC9ldGMvaG9zdG5hbWU7IGhvc3RuYW1lIC1GIC9ldGMvaG9zdG5hbWUiCiAtICJzZWQgLWkgLWUgJy9eMTI3LjAuMC4xL2QnIC9ldGMvaG9zdHM7IGVjaG8gMTI3LjAuMC4xIGRvY2RiLSRJTlNUQU5DRV9JRC5jbi1ub3J0aHdlc3QtMS50ZXN0LmJ3dHNpLmNuIGRvY2RiLSRJTlNUQU5DRV9JRCBsb2NhbGhvc3QgPj4gL2V0Yy9ob3N0cyIKICMgRGlzayBlbmNyeXB0aW9uIGtleSBmb3IgZXBoZW1lcmFsIGRpc2sgZHJpdmVzLCBzYXZlZCB0byByYW0gZHJpdmUKICMgVGhlIHNlZCBwYXJ0IHJlbW92ZXMgdGhlIChzdGRpbik9IG91dHB1dCBmcm9tIG9wZW5zc2wgZGdzdAogLSAiZWNobyAkSU5TVEFOQ0VfSUQgfCBvcGVuc3NsIGRnc3QgLXNoYTI1NiAtaG1hYyAnZHI2OVpVR1ZtMEVwMUVvL3hCb09UY2VmdUtWeCcgfCBzZWQgJ3MvXi4qPSAvLycgPiAvZGV2L3NobS9lbmNyeXB0ZWQtZGlzay5sdWtzLmtleSAmJiBjaG1vZCA0MDAgL2Rldi9zaG0vZW5jcnlwdGVkLWRpc2subHVrcy5rZXkiCgojIERvbid0IG92ZXJyaWRlIG91ciBhcHQgcmVwb3NpdG9yeSBsaXN0IG9uIGZpcnN0IGJvb3QKYXB0X3ByZXNlcnZlX3NvdXJjZXNfbGlzdDogdHJ1ZQoKIyBEb24ndCBwcmludCB0aGUgbmV3IHNzaCBrZXlzIG9uIHRoZSBjb25zb2xlCm5vX3NzaF9maW5nZXJwcmludHM6IHRydWUKCndyaXRlX2ZpbGVzOgogLSBwYXRoOiAvZXRjL3B1cHBldGxhYnMvcHVwcGV0L3B1cHBldC5jb25mCiAgIG93bmVyOiByb290OnJvb3QKICAgcGVybWlzc2lvbnM6ICcwNDQ0JwogICBjb250ZW50OiB8CiAgICAgW21haW5dCiAgICAgY2VydG5hbWUgPSBiYXNlLnRlc3RpbmcuYnd0c2kuY24KICAgICBlbnZpcm9ubWVudCA9IGNoaW5hcGF5CiAgICAgW2FnZW50XQogICAgIHJ1bmludGVydmFsID0gMTAweQogICAgIHNlcnZlciA9IHB1cHBldC5id3RzaS5jbgogICAgIG5vZGVfbmFtZSA9IGZhY3RlcgogICAgIG5vZGVfbmFtZV9mYWN0ID0gZnFkbgogICAgIHNwbGF5ID0gdHJ1ZQogICAgIHNwbGF5bGltaXQgPSA1bQo=</value>
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4:     </userData>
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: </DescribeInstanceAttributeResponse>
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: 2018/04/26 19:00:36 [DEBUG] [aws-sdk-go] DEBUG: Request ec2/DescribeInstanceCreditSpecifications Details:
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: ---[ REQUEST POST-SIGN ]-----------------------------
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: POST / HTTP/1.1
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Host: ec2.cn-northwest-1.amazonaws.com.cn
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: User-Agent: aws-sdk-go/1.13.32 (go1.9.2; darwin; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.11.7
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Content-Length: 95
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Authorization: AWS4-HMAC-SHA256 Credential=ASIAOS43C3BRNG62F4KQ/20180426/cn-northwest-1/ec2/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-security-token, Signature=60ac431f06b221bf7fe6d53ee72de1babb1aad5a5a4d17917e4d2f78a7533fef
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Content-Type: application/x-www-form-urlencoded; charset=utf-8
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: X-Amz-Date: 20180426T110036Z
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: X-Amz-Security-Token: FQoDYXdzECMaDBn0dTR5Adi+yqOKaSKBAunC9koGEWSi+glPaQcXYEBDxkkbz8wEPzhtRgEOofTKazqo1aOGnVCw4KltCP8JviHPrnGes/0BAfN0CSfANVZfkUGRRczLEtMWKj1j9gFkXPELpfxO10DI/iX4lxe3vdzQv2LeY0xFLLKW8PXNq4/nbjrNgr/2VTiL8IYECd9lzDlKsgwYY7W1IdMqA1KcXX41Q1CDifRou5KCBehUg9NE9mqwKcHMtikEcvM76PIZ33CkXWX9OacMjlk+YNf0/Ae1lhcq8qAAXDwPgJdb4X7OQiYyOh1HI/HbHIRw/Ae/V9t6OAFmz1662A2xHLSysyV74zuc17EYgN4t+Hpp9feLKLPVhtcF
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Accept-Encoding: gzip
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4:
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Action=DescribeInstanceCreditSpecifications&InstanceId.1=i-022a9894321a6d374&Version=2016-11-15
2018-04-26T19:00:36.718+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: -----------------------------------------------------
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: 2018/04/26 19:00:37 [DEBUG] [aws-sdk-go] DEBUG: Response ec2/DescribeInstanceCreditSpecifications Details:
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: ---[ RESPONSE ]--------------------------------------
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: HTTP/1.1 400 Bad Request
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Connection: close
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Transfer-Encoding: chunked
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Date: Thu, 26 Apr 2018 11:00:37 GMT
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: Server: AmazonEC2
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4:
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4:
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: -----------------------------------------------------
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: 2018/04/26 19:00:37 [DEBUG] [aws-sdk-go] <?xml version="1.0" encoding="UTF-8"?>
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: <Response><Errors><Error><Code>UnsupportedOperation</Code><Message>The functionality you requested is not available in this region.</Message></Error></Errors><RequestID>53ace3cc-2597-49a0-99b2-3b9f1cb8567d</RequestID></Response>
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: 2018/04/26 19:00:37 [DEBUG] [aws-sdk-go] DEBUG: Validate Response ec2/DescribeInstanceCreditSpecifications failed, not retrying, error UnsupportedOperation: The functionality you requested is not available in this region.
2018-04-26T19:00:37.370+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4:  status code: 400, request id: 53ace3cc-2597-49a0-99b2-3b9f1cb8567d
2018/04/26 19:00:37 [ERROR] root.docdb: eval: *terraform.EvalApplyPost, err: 1 error(s) occurred:

* aws_instance.riak: UnsupportedOperation: The functionality you requested is not available in this region.
    status code: 400, request id: 53ace3cc-2597-49a0-99b2-3b9f1cb8567d
2018/04/26 19:00:37 [ERROR] root.docdb: eval: *terraform.EvalSequence, err: 1 error(s) occurred:

* aws_instance.riak: UnsupportedOperation: The functionality you requested is not available in this region.
    status code: 400, request id: 53ace3cc-2597-49a0-99b2-3b9f1cb8567d
2018/04/26 19:00:37 [DEBUG] Uploading remote state to S3: {
  Body: buffer(0xc4203e17d0),
  Bucket: "bwts-terraform-bucket-chinapay",
  ContentLength: 20792,
  ContentType: "application/json",
  Key: "cn-northwest-1/riak/terraform.tfstate",
  ServerSideEncryption: "AES256"
}
2018/04/26 19:00:37 [DEBUG] [aws-sdk-go] DEBUG: Request s3/PutObject Details:
---[ REQUEST POST-SIGN ]-----------------------------
PUT /cn-northwest-1/riak/terraform.tfstate HTTP/1.1
Host: bwts-terraform-bucket-chinapay.s3.cn-northwest-1.amazonaws.com.cn
User-Agent: aws-sdk-go/1.12.75 (go1.10.1; darwin; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.11.6
Content-Length: 20792
Authorization: AWS4-HMAC-SHA256 Credential=ASIAOS43C3BRNG62F4KQ/20180426/cn-northwest-1/s3/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-security-token;x-amz-server-side-encryption, Signature=8aa16110ae06a99b503e1f0546a4d6cf208fdf658ca29420baa2d649cec043e2
Content-Type: application/json
X-Amz-Content-Sha256: 04110e3e4cd97aa3e89cfe2f03487922bfd6b6346ec6dfe3fbe8fad9755e18c2
X-Amz-Date: 20180426T110037Z
X-Amz-Security-Token: FQoDYXdzECMaDBn0dTR5Adi+yqOKaSKBAunC9koGEWSi+glPaQcXYEBDxkkbz8wEPzhtRgEOofTKazqo1aOGnVCw4KltCP8JviHPrnGes/0BAfN0CSfANVZfkUGRRczLEtMWKj1j9gFkXPELpfxO10DI/iX4lxe3vdzQv2LeY0xFLLKW8PXNq4/nbjrNgr/2VTiL8IYECd9lzDlKsgwYY7W1IdMqA1KcXX41Q1CDifRou5KCBehUg9NE9mqwKcHMtikEcvM76PIZ33CkXWX9OacMjlk+YNf0/Ae1lhcq8qAAXDwPgJdb4X7OQiYyOh1HI/HbHIRw/Ae/V9t6OAFmz1662A2xHLSysyV74zuc17EYgN4t+Hpp9feLKLPVhtcF
X-Amz-Server-Side-Encryption: AES256
Accept-Encoding: gzip

{
    "version": 3,
    "terraform_version": "0.11.6",
    "serial": 1,
    "lineage": "b9c3c084-789e-7472-0b18-8698b4afc854",
    "modules": [
        {
            "path": [
                "root"
            ],
            "outputs": {},
            "resources": {
                "data.terraform_remote_state.security_groups": {
                    "type": "terraform_remote_state",
                    "depends_on": [
                        "module.regional-common"
                    ],
                    "primary": {
                        "id": "2018-04-26 11:00:04.859497096 +0000 UTC",
                        "attributes": {
                            "backend": "s3",
                            "bastion_host": "sg-e29feb8b",
                            "config.%": "4",
                            "config.bucket": "bwts-terraform-bucket-chinapay",
                            "config.encrypt": "1",
                            "config.key": "cn-northwest-1/dev-stack-sgs/terraform.tfstate",
                            "config.region": "cn-northwest-1",
                            "environment": "default",
                            "external_lb_sg_id": "sg-a55027cc",
                            "id": "2018-04-26 11:00:04.859497096 +0000 UTC",
                            "rundeck": "sg-b39eeada",
                            "stack_it_run_access_sg_id": "sg-9d5f28f4",
                            "workspace": "default"
                        },
                        "meta": {},
                        "tainted": false
                    },
                    "deposed": [],
                    "provider": "provider.terraform"
                },
                "data.terraform_remote_state.vpc": {
                    "type": "terraform_remote_state",
                    "depends_on": [
                        "module.regional-common"
                    ],
                    "primary": {
                        "id": "2018-04-26 11:00:04.858615081 +0000 UTC",
                        "attributes": {
                            "backend": "s3",
                            "config.%": "4",
                            "config.bucket": "bwts-terraform-bucket-chinapay",
                            "config.encrypt": "1",
                            "config.key": "cn-northwest-1/vpc/terraform.tfstate",
                            "config.region": "cn-northwest-1",
                            "environment": "default",
                            "id": "2018-04-26 11:00:04.858615081 +0000 UTC",
                            "private_subnets": "subnet-454c962c,subnet-9722ddec",
                            "public_subnets": "subnet-5e4d9737,subnet-9022ddeb",
                            "vpc_cidr": "192.168.0.0/19",
                            "vpc_id": "vpc-34c61f5d",
                            "workspace": "default"
                        },
                        "meta": {},
                        "tainted": false
                    },
                    "deposed": [],
                    "provider": "provider.terraform"
                }
            },
            "depends_on": []
        },
        {
            "path": [
                "root",
                "docdb"
            ],
            "outputs": {},
            "resources": {
                "aws_instance.riak": {
                    "type": "aws_instance",
                    "depends_on": [
                        "data.template_file.cloud-init-riak"
                    ],
                    "primary": {
                        "id": "i-022a9894321a6d374",
                        "attributes": {
                            "ami": "ami-6ec1d50c",
                            "associate_public_ip_address": "false",
                            "availability_zone": "cn-northwest-1a",
                            "disable_api_termination": "false",
                            "ebs_block_device.#": "4",
                            "ebs_block_device.3965576335.delete_on_termination": "false",
                            "ebs_block_device.3965576335.device_name": "/dev/xvdd",
                            "ebs_block_device.3965576335.encrypted": "false",
                            "ebs_block_device.3965576335.iops": "300",
                            "ebs_block_device.3965576335.snapshot_id": "",
                            "ebs_block_device.3965576335.volume_id": "vol-09cde364159031c5d",
                            "ebs_block_device.3965576335.volume_size": "100",
                            "ebs_block_device.3965576335.volume_type": "gp2",
                            "ebs_block_device.3986656952.delete_on_termination": "false",
                            "ebs_block_device.3986656952.device_name": "/dev/xvde",
                            "ebs_block_device.3986656952.encrypted": "false",
                            "ebs_block_device.3986656952.iops": "300",
                            "ebs_block_device.3986656952.snapshot_id": "",
                            "ebs_block_device.3986656952.volume_id": "vol-09c14e768bdd6dd4b",
                            "ebs_block_device.3986656952.volume_size": "100",
                            "ebs_block_device.3986656952.volume_type": "gp2",
                            "ebs_block_device.3994770134.delete_on_termination": "false",
                            "ebs_block_device.3994770134.device_name": "/dev/xvdg",
                            "ebs_block_device.3994770134.encrypted": "false",
                            "ebs_block_device.3994770134.iops": "300",
                            "ebs_block_device.3994770134.snapshot_id": "",
                            "ebs_block_device.3994770134.volume_id": "vol-0e1b3ff63114f3003",
                            "ebs_block_device.3994770134.volume_size": "100",
                            "ebs_block_device.3994770134.volume_type": "gp2",
                            "ebs_block_device.4023988449.delete_on_termination": "false",
                            "ebs_block_device.4023988449.device_name": "/dev/xvdf",
                            "ebs_block_device.4023988449.encrypted": "false",
                            "ebs_block_device.4023988449.iops": "300",
                            "ebs_block_device.4023988449.snapshot_id": "",
                            "ebs_block_device.4023988449.volume_id": "vol-015467a2fec64cfdd",
                            "ebs_block_device.4023988449.volume_size": "100",
                            "ebs_block_device.4023988449.volume_type": "gp2",
                            "ebs_optimized": "false",
                            "ephemeral_block_device.#": "0",
                            "get_password_data": "false",
                            "iam_instance_profile": "",
                            "id": "i-022a9894321a6d374",
                            "instance_state": "running",
                            "instance_type": "t2.large",
                            "ipv6_addresses.#": "0",
                            "key_name": "pay_china",
                            "monitoring": "false",
                            "network_interface.#": "0",
                            "network_interface_id": "eni-fd55c3a4",
                            "placement_group": "",
                            "primary_network_interface_id": "eni-fd55c3a4",
                            "private_dns": "ip-192-168-14-135.cn-northwest-1.compute.internal",
                            "private_ip": "192.168.14.135",
                            "public_dns": "",
                            "public_ip": "",
                            "root_block_device.#": "1",
                            "root_block_device.0.delete_on_termination": "true",
                            "root_block_device.0.iops": "100",
                            "root_block_device.0.volume_id": "vol-0884c92d17ea04d83",
                            "root_block_device.0.volume_size": "20",
                            "root_block_device.0.volume_type": "gp2",
                            "security_groups.#": "0",
                            "source_dest_check": "true",
                            "subnet_id": "subnet-454c962c",
                            "tags.%": "9",
                            "tags.Decomission_Date": "never",
                            "tags.Environment": "chinapay",
                            "tags.Name": "docdb.pay.cn-northwest-1.test.bwtsi.cn",
                            "tags.Owner": "operations",
                            "tags.Purpose": "Riak instance",
                            "tags.Role": "docdb",
                            "tags.Stackname": "pay",
                            "tags.Started_By": "operations",
                            "tags.Warning": "Managed by terraform, do not edit",
                            "tenancy": "default",
                            "user_data": "f35050bdeefa2a2d9f354c0e699a5f2d7c393365",
                            "volume_tags.%": "0",
                            "vpc_security_group_ids.#": "1",
                            "vpc_security_group_ids.2301982502": "sg-9d5f28f4"
                        },
                        "meta": {
                            "e2bfb730-ecaa-11e6-8f88-34363bc7c4c0": {
                                "create": 600000000000,
                                "delete": 1200000000000,
                                "update": 600000000000
                            },
                            "schema_version": "1"
                        },
                        "tainted": false
                    },
                    "deposed": [],
                    "provider": "provider.aws"
                },
                "data.template_file.cloud-init-riak": {
                    "type": "template_file",
                    "depends_on": [],
                    "primary": {
                        "id": "a5f1f2b9d367e2b212c58642fd07eb0b9d6f956c763b7bc5e787b162bc75538d",
                        "attributes": {
                            "id": "a5f1f2b9d367e2b212c58642fd07eb0b9d6f956c763b7bc5e787b162bc75538d",
                            "rendered": "#cloud-config\nmounts:\n - [ephemeral0, null]\n\npreserve_hostname: true\nmanage_etc_hosts: false\n\nbootcmd:\n - \"echo pay \u003e /etc/tradeshift/stackname\"\n - \"echo docdb-$INSTANCE_ID \u003e /etc/hostname; hostname -F /etc/hostname\"\n - \"sed -i -e '/^127.0.0.1/d' /etc/hosts; echo 127.0.0.1 docdb-$INSTANCE_ID.cn-northwest-1.test.bwtsi.cn docdb-$INSTANCE_ID localhost \u003e\u003e /etc/hosts\"\n # Disk encryption key for ephemeral disk drives, saved to ram drive\n # The sed part removes the (stdin)= output from openssl dgst\n - \"echo $INSTANCE_ID | openssl dgst -sha256 -hmac 'dr69ZUGVm0Ep1Eo/xBoOTcefuKVx' | sed 's/^.*= //' \u003e /dev/shm/encrypted-disk.luks.key \u0026\u0026 chmod 400 /dev/shm/encrypted-disk.luks.key\"\n\n# Don't override our apt repository list on first boot\napt_preserve_sources_list: true\n\n# Don't print the new ssh keys on the console\nno_ssh_fingerprints: true\n\nwrite_files:\n - path: /etc/puppetlabs/puppet/puppet.conf\n   owner: root:root\n   permissions: '0444'\n   content: |\n     [main]\n     certname = base.testing.bwtsi.cn\n     environment = chinapay\n     [agent]\n     runinterval = 100y\n     server = puppet.bwtsi.cn\n     node_name = facter\n     node_name_fact = fqdn\n     splay = true\n     splaylimit = 5m\n",
                            "template": "#cloud-config\nmounts:\n - [ephemeral0, null]\n\npreserve_hostname: true\nmanage_etc_hosts: false\n\nbootcmd:\n - \"echo ${STACK_NAME} \u003e /etc/tradeshift/stackname\"\n - \"echo ${HOSTNAME}-$INSTANCE_ID \u003e /etc/hostname; hostname -F /etc/hostname\"\n - \"sed -i -e '/^127.0.0.1/d' /etc/hosts; echo 127.0.0.1 ${HOSTNAME}-$INSTANCE_ID.${REGION_DNS} ${HOSTNAME}-$INSTANCE_ID localhost \u003e\u003e /etc/hosts\"\n # Disk encryption key for ephemeral disk drives, saved to ram drive\n # The sed part removes the (stdin)= output from openssl dgst\n - \"echo $INSTANCE_ID | openssl dgst -sha256 -hmac '${DISK_ENCRYPTION_KEY}' | sed 's/^.*= //' \u003e /dev/shm/encrypted-disk.luks.key \u0026\u0026 chmod 400 /dev/shm/encrypted-disk.luks.key\"\n\n# Don't override our apt repository list on first boot\napt_preserve_sources_list: true\n\n# Don't print the new ssh keys on the console\nno_ssh_fingerprints: true\n\nwrite_files:\n - path: /etc/puppetlabs/puppet/puppet.conf\n   owner: root:root\n   permissions: '0444'\n   content: |\n     [main]\n     certname = ${CERT_NAME}\n     environment = ${ENVIRONMENT}\n     [agent]\n     runinterval = 100y\n     server = puppet.bwtsi.cn\n     node_name = facter\n     node_name_fact = fqdn\n     splay = true\n     splaylimit = 5m\n",
                            "vars.%": "6",
                            "vars.CERT_NAME": "base.testing.bwtsi.cn",
                            "vars.DISK_ENCRYPTION_KEY": "dr69ZUGVm0Ep1Eo/xBoOTcefuKVx",
                            "vars.ENVIRONMENT": "chinapay",
                            "vars.HOSTNAME": "docdb",
                            "vars.REGION_DNS": "cn-northwest-1.test.bwtsi.cn",
                            "vars.STACK_NAME": "pay"
                        },
                        "meta": {},
                        "tainted": false
                    },
                    "deposed": [],
                    "provider": "provider.template"
                }
            },
            "depends_on": []
        },
        {
            "path": [
                "root",
                "environment-common"
            ],
            "outputs": {
                "cert_name": {
                    "sensitive": false,
                    "type": "string",
                    "value": "base.testing.bwtsi.cn"
                },
                "domain_name_search": {
                    "sensitive": false,
                    "type": "string",
                    "value": "test.bwtsi.cn"
                },
                "environment_name": {
                    "sensitive": false,
                    "type": "string",
                    "value": "chinapay"
                },
                "environment_shortname": {
                    "sensitive": false,
                    "type": "string",
                    "value": "test"
                },
                "security_group_name_postfix": {
                    "sensitive": false,
                    "type": "string",
                    "value": ".chinapay"
                },
                "site": {
                    "sensitive": false,
                    "type": "string",
                    "value": "test"
                }
            },
            "resources": {},
            "depends_on": []
        },
        {
            "path": [
                "root",
                "global-common"
            ],
            "outputs": {
                "all_cidr_eu_west_1": {
                    "sensitive": false,
                    "type": "string",
                    "value": "10.88.0.0/16,172.25.128.0/21,172.25.120.0/21,172.25.112.0/21,172.31.248.0/21,172.31.240.0/21,172.21.0.0/19,172.19.0.0/19,172.22.0.0/19,172.18.0.0/19"
                },
                "base_tradeshift_net_account_id": {
                    "sensitive": false,
                    "type": "string",
                    "value": "694518486591"
                },
                "gcsops_cidr": {
                    "sensitive": false,
                    "type": "string",
                    "value": "52.17.22.143/32"
                },
                "gcsops_cn_cidr": {
                    "sensitive": false,
                    "type": "string",
                    "value": "54.223.95.7/32,54.223.198.170/32,54.223.211.136/32,52.80.34.103/32"
                },
                "office_ips": {
                    "sensitive": false,
                    "type": "string",
                    "value": "5.56.144.196/32,5.56.144.198/32,178.49.148.100/32,87.243.3.34/32,109.166.189.50/32,78.40.84.83/32,4.53.137.82/32,173.247.199.142/32,58.211.225.90/32,202.181.248.19/32,109.70.48.99/32"
                },
                "prod_base_tradeshift_net_dns": {
                    "sensitive": false,
                    "type": "string",
                    "value": "prod.base.tradeshift.net"
                },
                "prod_base_tradeshift_net_vpc_cdir": {
                    "sensitive": false,
                    "type": "string",
                    "value": "10.88.0.0/16"
                },
                "prod_base_tradeshift_net_vpc_id": {
                    "sensitive": false,
                    "type": "string",
                    "value": "vpc-264c9042"
                },
                "prod_ts_sv_nat_gateways": {
                    "sensitive": false,
                    "type": "string",
                    "value": "52.50.175.210/32,52.30.44.136/32,52.50.189.21/32"
                },
                "test_bwtsi_cn_vpc_cdir": {
                    "sensitive": false,
                    "type": "string",
                    "value": "192.168.0.0/19"
                },
                "test_bwtsi_cn_vpc_private_subnets": {
                    "sensitive": false,
                    "type": "string",
                    "value": "192.168.12.0/22,192.168.16.0/22"
                },
                "test_bwtsi_cn_vpc_public_subnets": {
                    "sensitive": false,
                    "type": "string",
                    "value": "192.168.0.0/22,192.168.4.0/22"
                },
                "tradeshift_com_public_zone_id": {
                    "sensitive": false,
                    "type": "string",
                    "value": "Z2OX0I8SM94425"
                },
                "translation_service_clients": {
                    "sensitive": false,
                    "type": "string",
                    "value": "5.56.144.196/32,5.56.144.198/32,4.53.137.82/32,173.247.199.142/32,130.185.137.106/32,202.181.248.19/32,52.17.87.187/32,52.30.44.136/32,52.30.58.232/32,52.31.203.95/32,52.49.119.80/32,52.49.49.111/32,52.49.5.171/32,52.50.108.6/32,52.50.175.210/32,52.50.189.21/32,52.50.255.154/32,52.50.91.189/32,54.195.199.108/32,54.78.39.106/32,58.211.225.90/32,89.150.143.118/32,54.222.150.122/32,54.222.194.56/32,109.70.48.99/32"
                },
                "truebn_org_nat_gateways": {
                    "sensitive": false,
                    "type": "string",
                    "value": "34.253.176.198/32,34.241.59.39/32"
                },
                "userdata_path": {
                    "sensitive": false,
                    "type": "string",
                    "value": "/Users/jordanhuang/bwts-orchestration/terraform/bwtsi.cn/china-pay/cn-northwest-1/riak/.terraform/modules/eff596488a3055adf7024741dffb9ca1/.."
                }
            },
            "resources": {},
            "depends_on": []
        },
        {
            "path": [
                "root",
                "regional-common"
            ],
            "outputs": {
                "availability_zones": {
                    "sensitive": false,
                    "type": "string",
                    "value": "cn-northwest-1a,cn-northwest-1b"
                },
                "backend_region": {
                    "sensitive": false,
                    "type": "string",
                    "value": "cn-northwest-1"
                },
                "base_ami_1604": {
                    "sensitive": false,
                    "type": "string",
                    "value": "ami-6ec1d50c"
                },
                "base_ami_1604_zfs": {
                    "sensitive": false,
                    "type": "string",
                    "value": "ami-edf8ec8f"
                },
                "chinapay_dns": {
                    "sensitive": false,
                    "type": "string",
                    "value": "cn-northwest-1.test.bwtsi.cn"
                },
                "key_name": {
                    "sensitive": false,
                    "type": "string",
                    "value": "pay_china"
                },
                "region": {
                    "sensitive": false,
                    "type": "string",
                    "value": "cn-northwest-1"
                },
                "region_dns": {
                    "sensitive": false,
                    "type": "string",
                    "value": "cn-northwest-1.test.bwtsi.cn"
                },
                "region_env": {
                    "sensitive": false,
                    "type": "string",
                    "value": "cn-northwest-1.test"
                }
            },
            "resources": {},
            "depends_on": []
        }
    ]
}

-----------------------------------------------------
2018/04/26 19:00:38 [DEBUG] [aws-sdk-go] DEBUG: Response s3/PutObject Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 200 OK
Connection: close
Content-Length: 0
Date: Thu, 26 Apr 2018 11:00:39 GMT
Etag: "807c608ab629b9b73914da058c923c20"
Server: AmazonS3
X-Amz-Id-2: 5Af+DuU/y0Ngtkb6wCq1R0Oz+ZrOYi4apbPsCZTSlwhSqnqBNB64rFL4HfBG6WB9GETdRmQyKnw=
X-Amz-Request-Id: 7984823D8787C039
X-Amz-Server-Side-Encryption: AES256

-----------------------------------------------------
2018/04/26 19:00:38 [DEBUG] [aws-sdk-go]
2018/04/26 19:00:38 [DEBUG] plugin: waiting for all plugin processes to complete...

Error: Error applying plan:

1 error(s) occurred:

* module.docdb.aws_instance.riak: 1 error(s) occurred:

* aws_instance.riak: UnsupportedOperation: The functionality you requested is not available in this region.
    status code: 400, request id: 53ace3cc-2597-49a0-99b2-3b9f1cb8567d

2018-04-26T19:00:38.547+0800 [DEBUG] plugin.terraform-provider-aws_v1.16.0_x4: 2018/04/26 19:00:38 [ERR] plugin: plugin server: accept unix /var/folders/k0/hk5r4k696x901sk4mh_vwcg40000gn/T/plugin243311916: use of closed network connection
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

2018-04-26T19:00:38.550+0800 [DEBUG] plugin: plugin process exited: path=/Users/jordanhuang/bwts-orchestration/terraform/bwtsi.cn/china-pay/cn-northwest-1/riak/.terraform/plugins/darwin_amd64/terraform-provider-template_v1.0.0_x4
2018-04-26T19:00:38.551+0800 [DEBUG] plugin: plugin process exited: path=/Users/jordanhuang/bwts-orchestration/terraform/bwtsi.cn/china-pay/cn-northwest-1/riak/.terraform/plugins/darwin_amd64/terraform-provider-aws_v1.16.0_x4
2018-04-26T19:00:38.555+0800 [DEBUG] plugin: plugin process exited: path=/usr/local/bin/terraform-provider-alicloud

Expected Behavior

can create aws instance in China AWS

Actual Behavior

I can create aws instance in China AWS with provider.aws v1.15.0 but I can't create aws instance with provider.aws v1.16.0

bflad commented 6 years ago

I'm guessing this is caused by the new call to DescribeInstanceCreditSpecifications -- we can have the provider ignore the error on read for UnsupportedOperation

bflad commented 6 years ago

Bugfix pull request submitted: #4362

bflad commented 6 years ago

The fix for this in the resource and data source has been merged into master and will release with v1.17.0 of the AWS provider, likely middle of next week.

bflad commented 6 years ago

This also affects GovCloud (US) as well: #4372

bflad commented 6 years ago

This has been released in version 1.17.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

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!