terraform/builtin/providers
Paul Stack 185c3dffe0 provider/aws: Refresh cloudwatch log subscription filter on 404 (#12333)
Fixes:#11750

Before this change, adding a log_subscription_filter and then deleting
it manually would yield this error on terraform plan/apply:

```
% 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_iam_role.iam_for_lambda: Refreshing state... (ID: test_lambdafuntion_iam_role_example123)
aws_cloudwatch_log_group.logs: Refreshing state... (ID: example_lambda_name)
aws_iam_role_policy.test_lambdafunction_iam_policy: Refreshing state... (ID: test_lambdafuntion_iam_role_example123:test_lambdafunction_iam_policy)
aws_lambda_function.test_lambdafunction: Refreshing state... (ID: example_lambda_name_example123)
aws_lambda_permission.allow_cloudwatch_logs: Refreshing state... (ID: AllowExecutionFromCloudWatchLogs)
aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter: Refreshing state... (ID: cwlsf-992677504)
Error refreshing state: 1 error(s) occurred:

* aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter: aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter: Subscription filter for log group example_lambda_name with name prefix test_lambdafunction_logfilter not found!

```

After this patch, we get the following behaviour:

```
% 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_iam_role.iam_for_lambda: Refreshing state... (ID: test_lambdafuntion_iam_role_example123)
aws_cloudwatch_log_group.logs: Refreshing state... (ID: example_lambda_name)
aws_lambda_function.test_lambdafunction: Refreshing state... (ID: example_lambda_name_example123)
aws_iam_role_policy.test_lambdafunction_iam_policy: Refreshing state... (ID: test_lambdafuntion_iam_role_example123:test_lambdafunction_iam_policy)
aws_lambda_permission.allow_cloudwatch_logs: Refreshing state... (ID: AllowExecutionFromCloudWatchLogs)
aws_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter: Refreshing state... (ID: cwlsf-992677504)
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_cloudwatch_log_subscription_filter.test_lambdafunction_logfilter
    destination_arn: "arn:aws:lambda:us-west-2:187416307283:function:example_lambda_name_example123"
    filter_pattern:  "logtype test"
    log_group_name:  "example_lambda_name"
    name:            "test_lambdafunction_logfilter"
    role_arn:        "<computed>"

Plan: 1 to add, 0 to change, 0 to destroy.
```
2017-03-01 22:12:50 +00:00
..
alicloud
archive
arukas
atlas
aws provider/aws: Refresh cloudwatch log subscription filter on 404 (#12333) 2017-03-01 22:12:50 +00:00
azure
azurerm provider/azurerm: Bump AzureRM SDK to v8.0.1-beta (#11866) 2017-02-23 18:14:55 +02:00
bitbucket
chef
clc
cloudflare
cloudstack
cobbler
consul
datadog provider/datadog: Add datadog_user resource (#12268) 2017-02-27 10:38:54 +00:00
digitalocean provider/digitalocean: Add support for LoadBalancers (#12077) 2017-02-23 23:41:20 +02:00
dme
dns
dnsimple
docker
dyn
external
fastly
github
google provider/google: fix url map test and update logic (#12317) 2017-03-01 09:47:12 +00:00
grafana
heroku
icinga2
ignition
influxdb
librato
logentries
mailgun
mysql
newrelic
nomad
ns1
null
openstack provider/openstack: Rename provider to loadbalancer_provider (#12239) 2017-02-28 16:06:49 +00:00
opsgenie
packet
pagerduty Setting incident_urgency_rule as optional (#12211) 2017-02-23 21:35:45 +02:00
postgresql
powerdns
profitbricks provider/profitbricks: fmt changes post cherry-pick 2017-02-23 18:07:29 +02:00
rabbitmq
rancher
random
rundeck
scaleway
softlayer
spotinst provider/spotinst: Disallow passing an empty user_data string (#12179) 2017-02-22 23:25:03 +02:00
statuscake
template
terraform update the remote state datasource 2017-02-28 16:35:46 -05:00
test flatmap: mark computed list as a computed value in Expand 2017-02-23 10:03:59 -08:00
tls
triton
ultradns
vault
vcd
vsphere