2
votes

I am using Terraform 0.11.10 (latest as of this date). I'm trying to use the codepipeline webhooks feature, as described here: https://www.terraform.io/docs/providers/aws/r/codepipeline_webhook.html

I have defined a webhook resource as follows:

resource "aws_codepipeline_webhook" "foo" { ... }

However Terraform complains:

Error: aws_codepipeline_webhook.foo: Provider doesn't support resource:
aws_codepipeline_webhook

I have re-initialized Terraform.

The documentation definitely exists, and I saw feature request discussing it that was marked as resolved here: https://github.com/terraform-providers/terraform-provider-aws/issues/4478

Anyone know of a way to get support for it?

1
Which AWS provider version are you running? Since 0.10 Terraform has unbundled the versions of providers and core Terraform.ydaetskcoR
I was using 1.39 and that webhook was introduced in 1.41! Make that comment an answer and I'll accept it!Asfand Qazi

1 Answers

2
votes

Since Terraform 0.10 the providers that interact with external APIs such as AWS have been unbundled and release features with a different cadence to core or each of the other providers.

Thus if you are looking to bring in fixes for provider specific bugs or new features such as new resources/data sources or new functionality in existing resources and data sources then you should also be upgrading your provider versions.

In this case the aws_codepipeline_webhook resource was released in the 1.41 AWS provider release so your AWS provider version wants to be at least at that version.