Coder Social home page Coder Social logo

rootlyhq / terraform-provider-rootly Goto Github PK

View Code? Open in Web Editor NEW
10.0 6.0 3.0 3.9 MB

Terraform provider for Rootly.

Home Page: https://registry.terraform.io/providers/rootlyhq/rootly

License: Mozilla Public License 2.0

Makefile 0.13% Go 95.89% JavaScript 3.98%

terraform-provider-rootly's Issues

Error: Insufficient task_params blocks when generating workflows

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

Affected Resource(s)

Please list the resources as a list, for example:

  • rootly_workflow_task_create_google_meeting
  • rootly_workflow_task_create_zoom_meeting
  • rootly_workflow_task_page_pagerduty_on_call_responders
  • rootly_workflow_task_update_pagerduty_incident

there are probably more resource that are impacted but we just are not using in rootly.

Expected Behavior

Terraform generates valid resources declarations when specifying the workflow resource.

Actual Behavior

running terraform plan results in the follow errors:

╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_create_google_meeting.tf line 1, in resource "rootly_workflow_task_create_google_meeting" "tfer--xxx":
│    1: resource "rootly_workflow_task_create_google_meeting" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_create_zoom_meeting.tf line 1, in resource "rootly_workflow_task_create_zoom_meeting" "xxx":
│    1: resource "rootly_workflow_task_create_zoom_meeting" "xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_create_zoom_meeting.tf line 9, in resource "rootly_workflow_task_create_zoom_meeting" "xxx":
│    9: resource "rootly_workflow_task_create_zoom_meeting" "xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_create_zoom_meeting.tf line 17, in resource "rootly_workflow_task_create_zoom_meeting" "xxx":
│   17: resource "rootly_workflow_task_create_zoom_meeting" "xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_create_zoom_meeting.tf line 25, in resource "rootly_workflow_task_create_zoom_meeting" "xxx":
│   25: resource "rootly_workflow_task_create_zoom_meeting" "xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_create_zoom_meeting.tf line 33, in resource "rootly_workflow_task_create_zoom_meeting" "xxx":
│   33: resource "rootly_workflow_task_create_zoom_meeting" "xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_create_zoom_meeting.tf line 41, in resource "rootly_workflow_task_create_zoom_meeting" "tfer--xxx":
│   41: resource "rootly_workflow_task_create_zoom_meeting" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_create_zoom_meeting.tf line 49, in resource "rootly_workflow_task_create_zoom_meeting" "tfer--xxx":
│   49: resource "rootly_workflow_task_create_zoom_meeting" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_create_zoom_meeting.tf line 57, in resource "rootly_workflow_task_create_zoom_meeting" "tfer--xxx":
│   57: resource "rootly_workflow_task_create_zoom_meeting" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_create_zoom_meeting.tf line 65, in resource "rootly_workflow_task_create_zoom_meeting" "tfer--xxx":
│   65: resource "rootly_workflow_task_create_zoom_meeting" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_create_zoom_meeting.tf line 73, in resource "rootly_workflow_task_create_zoom_meeting" "tfer--xxx":
│   73: resource "rootly_workflow_task_create_zoom_meeting" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_create_zoom_meeting.tf line 81, in resource "rootly_workflow_task_create_zoom_meeting" "tfer--xxx":
│   81: resource "rootly_workflow_task_create_zoom_meeting" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_page_pagerduty_on_call_responders.tf line 1, in resource "rootly_workflow_task_page_pagerduty_on_call_responders" "xxx":
│    1: resource "rootly_workflow_task_page_pagerduty_on_call_responders" "xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_page_pagerduty_on_call_responders.tf line 9, in resource "rootly_workflow_task_page_pagerduty_on_call_responders" "xxx":
│    9: resource "rootly_workflow_task_page_pagerduty_on_call_responders" "xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_page_pagerduty_on_call_responders.tf line 17, in resource "rootly_workflow_task_page_pagerduty_on_call_responders" "xxx":
│   17: resource "rootly_workflow_task_page_pagerduty_on_call_responders" "xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_page_pagerduty_on_call_responders.tf line 25, in resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx":
│   25: resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_page_pagerduty_on_call_responders.tf line 33, in resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx":
│   33: resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_page_pagerduty_on_call_responders.tf line 41, in resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx":
│   41: resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_page_pagerduty_on_call_responders.tf line 49, in resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx":
│   49: resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_page_pagerduty_on_call_responders.tf line 57, in resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx":
│   57: resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_page_pagerduty_on_call_responders.tf line 65, in resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx":
│   65: resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_page_pagerduty_on_call_responders.tf line 73, in resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx":
│   73: resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_page_pagerduty_on_call_responders.tf line 81, in resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx":
│   81: resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_page_pagerduty_on_call_responders.tf line 89, in resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx":
│   89: resource "rootly_workflow_task_page_pagerduty_on_call_responders" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.
╵
╷
│ Error: Insufficient task_params blocks
│
│   on workflow_task_update_pagerduty_incident.tf line 1, in resource "rootly_workflow_task_update_pagerduty_incident" "tfer--xxx":
│    1: resource "rootly_workflow_task_update_pagerduty_incident" "tfer--xxx" {
│
│ At least 1 "task_params" blocks are required.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraformer-rootly import rootly --resources="workflow" --token $ROOTLY_API_TOKEN
  2. terraform init
  3. terraform plan

`OpsGenie Team / External ID` not supported in the provider.

Feature request

Setting OpsGenie Team / External ID not supported in the provider.

In the rootly UI it is possible to set/edit a field called OpsGenie Team / External ID. This field currently cannot be provisioned with the rootly terraform provider and doesn't seem to exist in the source.

It is also not possible to read this field with a manual, former import through the UI, because the data source does not expose it either.

The OpsGenie terraform provider does export the team id and we're using terraform to provision both OpsGenie and rootly so this value is available to us - would it be possible to add support for the OpsGenie Team / External ID field to the rootly terraform provider so we can provision the mapping?

Terraform Version

Terraform v1.5.6
on linux_amd64

Affected Resource(s)

  • rootly_team

resource_postmortem_template content attribute does properly apply updates

Updates to the content attribute require recreating the resource. There's a ForceNew flag in the schema, but this isn't working properly for some reason.

The reason updating content requires creating a new resource is because Rootly's API returns content after filtering and formatting HTML. Terraform doesn't support this behavior.

`provider.tf` is incorrectly generated causing failure to initialize terraform.

Terraform Version

1.5.7

Expected Behavior

terraformer rootly generates proper provider.tf files. For example:

terraform {
  required_version = ">= 0.13.1"
  
  required_providers {
    rootly = {
      source = "rootlyhq/rootly"
      version = "1.2.17"
    }
  }
}

provider "rootly" {
  # Configuration options
}

Actual Behavior

You will encounter this error when you initialize the any workspace generated by terraformer

terraform init

Initializing the backend...
╷
│ Error: Invalid legacy provider address
│
│ This configuration or its associated state refers to the unqualified provider "rootly".
│
│ You must complete the Terraform 0.13 upgrade process before upgrading to later versions.
╵

This is the file that is generated:

terraform {
	required_providers {
		rootly = {
	    version = "~> 1.2.17"
		}
  }
}

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:
Run Rootly terraformer and look at the resulting providers.tf generated.

Important Factoids

The work around is to first generate the terraform with terraformer, then manually update the providers.tf and then update the state with:

terraform state replace-provider -auto-approve "registry.terraform.io/-/rootly" "rootlyhq/rootly"                                                                                                                                                           SRE-3207
Terraform will perform the following actions:

  ~ Updating provider:
    - registry.terraform.io/-/rootly
    + registry.terraform.io/rootlyhq/rootly

Changing 432 resources:
...

rootly_team.id returned is not valid as input into rootly_workflow_incident group_ids

Possibly an issue of expectation, but I was hoping to see the data.rootly_teams.grp_security.id value as the guid-style id as per the API - what is returned is a (provider assigned?) integer style id that won't be accepted as valid rootly_workflow_incident group_ids content.

The https://api.rootly.com/v1/teams API call returns:
{
"id": "4566dd9a-e368-4288-8be7-b32eab46270f",
"type": "groups",
"attributes": {
"slug": "security",
....
}
}

But the TF id is "1661805916"

Terraform Version

Terraform v 1.2.8 on windows_amd64

Affected Resource(s)

rootly_workflow_incident

Terraform Configuration Files

data "rootly_teams" "grp_security" {
slug = "security"
}

resource "rootly_workflow_incident" "tftest" {
name = "TF Test"
description = "testing the tf creation of incident workflows"
command = "create-jira-incident-workflow"
group_ids = [ "4566dd9a-e368-4288-8be7-b32eab46270f",
"908af556-aab3-4372-94f4-91aee86c2081",
data.rootly_teams.grp_security.id ]
trigger_params {
incident_condition_kind = "ANY"
}
}

Debug Output

https://gist.github.com/pierzapin/d18c74158bf3ed6cebdb7eff033f7149

Expected Behavior

The security team is added to the set of workflow team conditions

Actual Behavior

The resource id for the team data element is rejected as invalid

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply and confirm with 'yes'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.