No attribute confidential_note_channel is provided in gitlab_service_slack resource

Bug Report

Looking at the API documentation of Slack integration, I see the field of confidential_note_channel exists, but not in Terraform resource of gitlab_service_slack. During terraform validate it throws an error.

Relevant Terraform Configuration

variable "slack_project_hooks" {
 description = "The Slack notifications integration enables your GitLab project to send events (such as issue creation) to your existing Slack team as notifications."
 type = list(object({
   webhook                      = string
   branches_to_be_notified      = optional(string)
   notify_only_broken_pipelines = optional(bool, false)
   username                     = optional(string)

   confidential_issues_events = optional(object({
     channel = string
     enabled = bool
     }), {
     channel = null
     enabled = false
   })

   confidential_note_events = optional(object({
     channel = string
     enabled = bool
     }), {
     channel = null
     enabled = false
   })

   issues_events = optional(object({
     channel = string
     enabled = bool
     }), {
     channel = null
     enabled = false
   })

   merge_requests_events = optional(object({
     channel = string
     enabled = bool
     }), {
     channel = null
     enabled = false
   })

   note_events = optional(object({
     channel = string
     enabled = bool
     }), {
     channel = null
     enabled = false
   })

   pipeline_events = optional(object({
     channel = string
     enabled = bool
     }), {
     channel = null
     enabled = false
   })

   push_events = optional(object({
     channel = string
     enabled = bool
     }), {
     channel = null
     enabled = false
   })

   tag_push_events = optional(object({
     channel = string
     enabled = bool
     }), {
     channel = null
     enabled = false
   })

   wiki_page_events = optional(object({
     channel = string
     enabled = bool
     }), {
     channel = null
     enabled = false
   })
 }))

 default = []
}

resource "gitlab_service_slack" "default" {
 for_each = { for index, slack_webhook in var.slack_project_hooks : index => slack_webhook }

 # required attributes
 project = gitlab_project.default.id
 webhook = each.value.webhook

 # optional attributes
 branches_to_be_notified      = each.value.branches_to_be_notified
 notify_only_broken_pipelines = each.value.notify_only_broken_pipelines
 username                     = each.value.username

 confidential_issues_events  = each.value.confidential_issues_events.enabled
 confidential_issue_channel = each.value.confidential_issues_events.channel

 confidential_note_events  = each.value.confidential_note_events.enabled
 # ---> This attribute not exists <---
 confidential_note_channel = each.value.confidential_note_events.channel

 issues_events  = each.value.issues_events.enabled
 issue_channel = each.value.issues_events.channel

 merge_requests_events  = each.value.merge_requests_events.enabled
 merge_request_channel = each.value.merge_requests_events.channel

 note_events  = each.value.note_events.enabled
 note_channel = each.value.note_events.channel

 pipeline_events  = each.value.pipeline_events.enabled
 pipeline_channel = each.value.pipeline_events.channel

 push_events  = each.value.push_events.enabled
 push_channel = each.value.push_events.channel

 tag_push_events  = each.value.tag_push_events.enabled
 tag_push_channel = each.value.tag_push_events.channel

 wiki_page_events  = each.value.wiki_page_events.enabled
 wiki_page_channel = each.value.wiki_page_events.channel
}

Relevant Log Output

➜ ✗ terraform validate

│ Error: Unsupported argument

│   on modules/project/main.tf line 337, in resource "gitlab_service_slack" "default":
│  337:   confidential_note_channel = each.value.confidential_note_events.channel

│ An argument named "confidential_note_channel" is not expected here.

Additional Details

  • GitLab Terraform Provider Version: v3.20.0
  • GitLab Version: Gitlab Premium
  • Terraform Version: v1.3.5
Edited by Donatas Navidonskis