terraform/builtin/providers
Paul Stack 62347ea833 provider/aws: Fall back to old tagging mechanism for AWS gov and aws China (#14627)
Fixes: #14535

When in a `restricted` cloud, we should fall back to the old method of
tagging. Before this change we saw the following:

```
% terraform apply                                                                                                                                                                                         ✭
aws_instance.foo: Creating...
  ami:                          "" => "ami-0fa3c42c"
  associate_public_ip_address:  "" => "<computed>"
  availability_zone:            "" => "<computed>"
  ebs_block_device.#:           "" => "<computed>"
  ephemeral_block_device.#:     "" => "<computed>"
  instance_state:               "" => "<computed>"
  instance_type:                "" => "m1.small"
  ipv6_address_count:           "" => "<computed>"
  ipv6_addresses.#:             "" => "<computed>"
  key_name:                     "" => "<computed>"
  network_interface.#:          "" => "<computed>"
  network_interface_id:         "" => "<computed>"
  placement_group:              "" => "<computed>"
  primary_network_interface_id: "" => "<computed>"
  private_dns:                  "" => "<computed>"
  private_ip:                   "" => "<computed>"
  public_dns:                   "" => "<computed>"
  public_ip:                    "" => "<computed>"
  root_block_device.#:          "" => "<computed>"
  security_groups.#:            "" => "<computed>"
  source_dest_check:            "" => "true"
  subnet_id:                    "" => "<computed>"
  tags.%:                       "" => "1"
  tags.foo:                     "" => "bar"
  tenancy:                      "" => "<computed>"
  volume_tags.%:                "" => "<computed>"
  vpc_security_group_ids.#:     "" => "<computed>"
aws_instance.foo: Creation complete (ID: i-0009f227ae24791b9)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

% terraform plan                                                                                                                                                                                          ✭
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_instance.foo: Refreshing state... (ID: i-0009f227ae24791b9)
The Terraform execution plan has been generated and is shown below.
Resources are shown in alphabetical order for quick scanning. Green resources
will be created (or destroyed and then created if an existing resource
exists), yellow resources are being changed in-place, and red resources
will be destroyed. Cyan entries are data sources to be read.

Note: You didn't specify an "-out" parameter to save this plan, so when
"apply" is called, Terraform can't guarantee this is what will execute.

~ aws_instance.foo
    tags.%:   "0" => "1"
    tags.foo: "" => "bar"

Plan: 0 to add, 1 to change, 0 to destroy.
```

After this patch, we see the following:

```
% terraform apply                                                                                                                                                                                       ✹ ✭
[WARN] /Users/stacko/Code/go/bin/terraform-provider-aws overrides an internal plugin for aws-provider.
  If you did not expect to see this message you will need to remove the old plugin.
  See https://www.terraform.io/docs/internals/internal-plugins.html
aws_instance.foo: Creating...
  ami:                          "" => "ami-0fa3c42c"
  associate_public_ip_address:  "" => "<computed>"
  availability_zone:            "" => "<computed>"
  ebs_block_device.#:           "" => "<computed>"
  ephemeral_block_device.#:     "" => "<computed>"
  instance_state:               "" => "<computed>"
  instance_type:                "" => "m1.small"
  ipv6_address_count:           "" => "<computed>"
  ipv6_addresses.#:             "" => "<computed>"
  key_name:                     "" => "<computed>"
  network_interface.#:          "" => "<computed>"
  network_interface_id:         "" => "<computed>"
  placement_group:              "" => "<computed>"
  primary_network_interface_id: "" => "<computed>"
  private_dns:                  "" => "<computed>"
  private_ip:                   "" => "<computed>"
  public_dns:                   "" => "<computed>"
  public_ip:                    "" => "<computed>"
  root_block_device.#:          "" => "<computed>"
  security_groups.#:            "" => "<computed>"
  source_dest_check:            "" => "true"
  subnet_id:                    "" => "<computed>"
  tags.%:                       "" => "1"
  tags.foo:                     "" => "bar"
  tenancy:                      "" => "<computed>"
  volume_tags.%:                "" => "<computed>"
  vpc_security_group_ids.#:     "" => "<computed>"
aws_instance.foo: Creation complete (ID: i-04cd122e28f167a14)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

% terraform plan                                                                                                                                                                                        ✹ ✭
[WARN] /Users/stacko/Code/go/bin/terraform-provider-aws overrides an internal plugin for aws-provider.
  If you did not expect to see this message you will need to remove the old plugin.
  See https://www.terraform.io/docs/internals/internal-plugins.html
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

aws_instance.foo: Refreshing state... (ID: i-04cd122e28f167a14)
No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, Terraform
doesn't need to do anything.
```
2017-05-18 17:28:37 +03:00
..
alicloud
archive
arukas
atlas
aws provider/aws: Fall back to old tagging mechanism for AWS gov and aws China (#14627) 2017-05-18 17:28:37 +03:00
azure
azurerm [MS] Adding support for VMSS Data Disks using Managed Disk feature (#14608) 2017-05-18 14:30:19 +03:00
bitbucket
chef
circonus
clc
cloudflare
cloudstack
cobbler
consul
datadog Added new evaluation_delay parameter (#14433) 2017-05-12 16:12:21 +03:00
digitalocean Fix parsing of digitalocean dns records (#14215) 2017-05-16 12:10:34 +03:00
dme provider/dme: Save records in lowercase to avoid diffs (#14130) 2017-05-02 06:36:16 +01:00
dns don't rename imports except to avoid collisions 2017-05-17 15:35:04 -04:00
dnsimple Make dnsimple_records importable (#9130) 2017-04-27 02:07:23 +12:00
docker Allow Windows Docker containers to map volumes (#13584) 2017-05-15 13:09:50 +03:00
dyn Add verbose Dyn provider logs (#14076) 2017-05-06 01:24:14 +02:00
external
fastly Makes cache setting condition optional in fastly service 2017-04-30 17:16:06 -03:00
github github_user: add acceptance tests 2017-05-17 17:07:15 +02:00
gitlab provider/gitlab: Adding default values to gitlab_project_hook resource 2017-05-04 19:59:32 +03:00
google provider/google: Fix the health check default values for http and https so they match the expected value in the documentation and specific health check instances. (#14441) 2017-05-15 12:59:44 -07:00
grafana
heroku providers/heroku: import heroku_pipeline_coupling resource (#14495) 2017-05-17 09:53:08 -05:00
http http provider and http request data source 2017-05-08 17:37:48 -07:00
icinga2
ignition
influxdb
kubernetes provider/kubernetes: Add support for Service (#14554) 2017-05-17 14:43:53 +02:00
librato
local
logentries
mailgun
mysql
newrelic
nomad provider/nomad: Update Nomad provider tests 2017-05-04 15:52:55 -04:00
ns1
null
oneandone
openstack provider/openstack: Handle Deleted Resources in Floating IP Association (#14533) 2017-05-16 11:36:50 +03:00
opsgenie
ovh provider/ovh: new provider (#12669) 2017-05-16 17:26:43 +03:00
packet
pagerduty provider/pagerduty: Randomize names in acceptance tests (#14364) 2017-05-11 09:14:30 -05:00
postgresql Merge pull request #11452 from pbthorste/master 2017-05-02 11:41:26 -04:00
powerdns
profitbricks Private images Fix (#14173) 2017-05-03 22:29:03 +03:00
rabbitmq
rancher rancher_environment: fix typo 2017-05-18 15:20:42 +02:00
random
rundeck adds `description` to `command` schema in `rundeck_job` resource 2017-05-11 14:30:21 +03:00
scaleway provider/scaleway: allow public_ip to be set (#14515) 2017-05-16 11:59:39 +03:00
softlayer
spotinst
statuscake
template provider/template: template_dir explicitly create dest dir 2017-04-25 10:48:26 -07:00
terraform
test providers/test: Add count resource <-> data source dep count scale tests 2017-05-12 15:45:06 -07:00
tls
triton Make triton machine deletes synchronous. 2017-05-11 11:42:15 +03:00
ultradns use validation helper 2017-04-25 20:06:33 +00:00
vault provider/vault: Prevent panic when no secret found (#14435) 2017-05-13 01:14:14 +03:00
vcd
vsphere