PagerDuty / terraform-provider-pagerduty

Terraform PagerDuty provider
https://www.terraform.io/docs/providers/pagerduty/
Mozilla Public License 2.0
206 stars 210 forks source link

The attribute "integration_key" is deprecated. Refer to the provider documentation for details #799

Closed kingferiol closed 8 months ago

kingferiol commented 8 months ago

Hi there,

We are receiving the following warning

Warning: Deprecated attribute

  on ../pagerduty-service/sns-topic.tf line 14, in resource "aws_sns_topic_subscription" "pagerduty_cloudwatch":
  14:   endpoint = "https://events.pagerduty.com/integration/${pagerduty_service_integration.cloudwatch.integration_key}/enqueue"

The attribute "integration_key" is deprecated. Refer to the provider documentation for details.

But on the documentation (https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/resources/service_integration), I can still find this example

To configure an event, please use the integration_key in the following interpolation:

https://events.pagerduty.com/integration/${pagerduty_service_integration.slack.integration_key}/enqueue

Thanks for all the help/support

Terraform Version

1.6

Plugin version

3.4.0

gopipalamalai commented 8 months ago

Seems like according to this change https://github.com/PagerDuty/terraform-provider-pagerduty/pull/775/files it can be used as read-only, but not as input in an upcoming major release.

"integration_key": {
                Type:       schema.TypeString,
                Optional:   true,
                Computed:   true,
                Deprecated: "Assignments or updates to this attribute are not supported by Service Integrations API, it is a read-only value. Input support will be dropped in upcomming major release",
kingferiol commented 8 months ago

Hi @gopipalamalai

Thanks for your answer.

At this point what's the correct implementation to drop the WARNING?

Best

Maurizio

gopipalamalai commented 8 months ago

We are using it has read only, attribute reference, in our code so we are ignoring the warning. Not sure what the alternative workaround is if this is used as input argument.