terraform-provider-opsgenie icon indicating copy to clipboard operation
terraform-provider-opsgenie copied to clipboard

Set tags when creating a new service

Open multani opened this issue 5 years ago • 7 comments

The API doesn't support updating tags when updating a new service (see https://docs.opsgenie.com/docs/service-api#update-service), so updates are silently ignored.

I'm not sure what's the best to do here: ignore or force the creation of a new service? Maybe the Opsgenie plan to expose this in the future?

Fix (partially): #144

This needs an update of the Opsgenie SDK with https://github.com/opsgenie/opsgenie-go-sdk-v2/pull/57

multani avatar Aug 06 '20 16:08 multani

Hey @multani could you please update your go.mod to get latest opsgenie-go-sdk-v2

ffahri avatar Aug 14 '20 15:08 ffahri

Hey @multani could you please update your go.mod to get latest opsgenie-go-sdk-v2

I updated to use the current master and rebased over this provider's master branch.

multani avatar Aug 15 '20 15:08 multani

PR looks good but i'll create a internal ticket about update tags issue. We should wait the ticket answer to merge this pr thank you @multani

ffahri avatar Aug 20 '20 13:08 ffahri

PR looks good but i'll create a internal ticket about update tags issue. We should wait the ticket answer to merge this pr thank you @multani

The best would be to expose on the API the service update tags functionality, that would be the best to have!

multani avatar Aug 20 '20 13:08 multani

internal ticket created, after that ticket will be done we can introduce it

ffahri avatar Aug 21 '20 10:08 ffahri

@ffahri Any news on this?

multani avatar Feb 16 '21 15:02 multani

Hey all! Im from the Opsgenie support team!

Just wanted to let you know that our development have now enabled support for add/remove tags for services in Public api. So you can use the following CURL command outlined in this document https://docs.opsgenie.com/docs/service-api#update-service to add or remove tags from an exisiting service.

Example body:

{
  "name": "Service API Test Service - Tags",
  "description": "Service API Test Service Description [Updated]",
  "tags": [
    "tag1",
    "tag2"
  ]
}

ConnorEyles-atlassian avatar Nov 16 '21 22:11 ConnorEyles-atlassian

I rebased on top of latest master and added support for updating services.

This requires https://github.com/opsgenie/opsgenie-go-sdk-v2/pull/120 in the SDK to be merged first, released and then the SDK to be updated in the Terraform provider.

multani avatar Jan 10 '23 17:01 multani

@multani the sdk has been updated, is your PR ready for review?

koushik-swaminathan avatar Oct 12 '23 11:10 koushik-swaminathan

@multani the sdk has been updated, is your PR ready for review?

3 years old PR, give me a moment to take a look at it again 😅

multani avatar Oct 12 '23 14:10 multani

@multani the sdk has been updated, is your PR ready for review?

@koushik-swaminathan It is now, can you take a look?

multani avatar Oct 13 '23 04:10 multani

LGTM, merging the PR 👍

koushik-swaminathan avatar Oct 16 '23 09:10 koushik-swaminathan