Skip to content

Receiving approvalSettings and resourceApprovalSettings service properties must match error on resource creation without any changes in environment provisioning #223

Open
@fcma-creid1

Description

@fcma-creid1

Provider version: 2.17.0

We use the LaunchDarkly Terraform Provider for creating our projects and adding environment overrides when needed. If environment overrides aren't specified, we use the expected defaults.

We haven't changed anything around our defaults, but now getting an odd error from the provider when adding a new project:

module.launchdarkly_projects.launchdarkly_project.my-project["my-new-api"]: Creating...
╷
│ Error: failed to update environment with key "production" for project: "my-new-api": 400 Bad Request: {"message":"approvalSettings and resourceApprovalSettings service properties must match"}
│
│   with module.launchdarkly_projects.launchdarkly_project.my-project["my-new-api"],
│   on ..\..\src\project.tf line 1, in resource "launchdarkly_project" "my-project":

I can add the project manually, and set the ServiceNow approvals the way I would expect on the Production environment. I can't find any references to the error I'm getting, and as best as I can tell, the format of the block is what I'd expect - pulled from the debug logs running terraform apply, I see this production environment block for the tainted resource:

              {
                "api_key": "",
                "approval_settings": [
                  {
                    "can_apply_declined_changes": true,
                    "can_review_own_request": false,
                    "min_num_approvals": 1,
                    "required": true,
                    "required_approval_tags": null,
                    "service_config": {
                      "detail_column": "justification",
                      "template": "2d0d5f001bafb010308ec9d2604bcb80"
                    },
                    "service_kind": "servicenow"
                  }
                ],
                "client_side_id": "",
                "color": "417505",
                "confirm_changes": true,
                "default_track_events": false,
                "default_ttl": 0,
                "key": "production",
                "mobile_key": "",
                "name": "Production",
                "require_comments": true,
                "secure_mode": false,
                "tags": null
              }

The ServiceNow block looks like I'd expect, and I'm also able to manually configure the project in the LD UI. Unfortunately, Terraform taints it and wants to tear it down and recreate it (to failure) every time.

Appreciate any insights or context that would help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions