opentofu/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 update alicloud provider (#11235) 2017-01-19 14:08:56 +00:00
archive adding (backwards compatible) support for providing multiple source filename and content (#11271) 2017-01-23 22:17:45 +00:00
arukas New provider arukas (#11171) 2017-02-13 19:11:30 +00:00
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 provider/bitbucket: Remove unnecessary casts. 2016-09-22 17:35:03 +10:00
chef provider/chef: Updating the provider_test comments to remove a company name (#10197) 2016-11-18 10:53:21 +02:00
clc
cloudflare add missing return 2017-02-16 07:57:34 -05:00
cloudstack Make the hash consistent again (#11546) 2017-01-31 15:00:11 +01:00
cobbler
consul Remove the AWS Access Key and Secret Access keys from the (#12061) 2017-02-17 13:36:38 -08:00
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 [WIP] provider/azurerm: Bump sdk version to 7.0.1 (#10458) 2016-12-06 08:39:47 +00:00
dns provider/dns: DNS dynamic updates (RFC 2136) 2017-02-10 21:38:26 +01:00
dnsimple
docker provider/docker: Add support for a list of pull_triggers within the docker_image resource. (#10845) 2017-01-03 16:10:39 +00:00
dyn
external "external" data source, for integrating with external programs (#8768) 2016-12-05 17:24:57 +00:00
fastly provider/fastly Adds fastly response object (#12032) 2017-02-17 10:36:05 -06:00
github provider/github: supports importing resources (#10382) 2016-11-28 17:30:24 +00:00
google provider/google: fix url map test and update logic (#12317) 2017-03-01 09:47:12 +00:00
grafana
heroku provider/heroku: Fix failing acceptance test (#11374) 2017-01-24 14:10:11 +02:00
icinga2 Initial check in for Icinga2 Provider/Resource (#8306) 2016-12-12 15:28:26 +00:00
ignition provider/ignition: mount and path are mutually exclusive (#11409) 2017-01-27 21:28:42 +02:00
influxdb
librato provider/librato: Randomize the test case names as dangling resources were causing failures 2016-09-22 12:43:06 +01:00
logentries
mailgun
mysql
newrelic provider/newrelic: Add new provider for New Relic 2016-12-15 19:14:59 +00:00
nomad provider/nomad: Update jobspec parser 2017-02-03 18:19:23 -05:00
ns1 provider/ns1/record: Fix "use_client_subnet". (#11368) 2017-01-29 16:45:13 +00:00
null
openstack provider/openstack: Rename provider to loadbalancer_provider (#12239) 2017-02-28 16:06:49 +00:00
opsgenie provider/opsgenie: Descriptions for Teams (#11391) 2017-01-29 15:52:23 +00:00
packet
pagerduty Setting incident_urgency_rule as optional (#12211) 2017-02-23 21:35:45 +02:00
postgresql fix wrong usage of hashicorp/errwrap (#11500) 2017-01-29 19:19:48 +00:00
powerdns
profitbricks provider/profitbricks: fmt changes post cherry-pick 2017-02-23 18:07:29 +02:00
rabbitmq Fix vet issues 2016-10-18 11:11:12 -04:00
rancher rancher: parse Rancher client cli.json config file (#11658) 2017-02-15 09:51:56 +00:00
random Add a prefix option to random_id provider 2017-02-16 11:08:17 -05:00
rundeck Improving Rundeck provider: scheduler (#9449) 2016-12-13 12:00:53 +00:00
scaleway provider/scaleway: fix provider configuration (#11234) 2017-01-17 12:50:10 +00:00
softlayer
spotinst provider/spotinst: Disallow passing an empty user_data string (#12179) 2017-02-22 23:25:03 +02:00
statuscake provider/statuscake: Fixing up the StatusCake acceptance tests (#12006) 2017-02-16 16:20:23 +02:00
template providers/template: disallow file paths in template 2016-11-22 10:23:58 -08:00
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 Restore tls_cert_request to being a managed resource 2016-09-24 12:22:07 -07:00
triton
ultradns ultradns: revert record thresholds 2017-02-10 13:11:33 -08:00
vault provider/vault: vault_policy resource (#10980) 2017-02-13 18:53:45 +00:00
vcd provider/vcd: Updated dependencies to use ukcloud/govcloudair (#11535) 2017-01-31 11:11:06 +00:00
vsphere Don't ignore VM power on errors. This prevents Terraform from hanging indefinitely for the VM to power on. (#11604) 2017-02-01 14:31:40 +00:00