Skip to content

Latest commit

 

History

History
142 lines (114 loc) · 2.72 KB

launchdarkly_webhook.md

File metadata and controls

142 lines (114 loc) · 2.72 KB

launchdarkly_webhook

back

Index

Terraform

terraform {
  required_providers {
    launchdarkly = ">= 1.5.1"
  }
}

top

Example Usage

module "launchdarkly_webhook" {
  source = "./modules/launchdarkly/d/launchdarkly_webhook"

  # name - (optional) is a type of string
  name = null
  # secret - (optional) is a type of string
  secret = null
  # tags - (optional) is a type of set of string
  tags = []

  policy_statements = [{
    actions       = []
    effect        = null
    not_actions   = []
    not_resources = []
    resources     = []
  }]
}

top

Variables

variable "name" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "secret" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "tags" {
  description = "(optional)"
  type        = set(string)
  default     = null
}

variable "policy_statements" {
  description = "nested block: NestingList, min items: 0, max items: 0"
  type = set(object(
    {
      actions       = list(string)
      effect        = string
      not_actions   = list(string)
      not_resources = list(string)
      resources     = list(string)
    }
  ))
  default = []
}

top

Datasource

data "launchdarkly_webhook" "this" {
  # name - (optional) is a type of string
  name = var.name
  # secret - (optional) is a type of string
  secret = var.secret
  # tags - (optional) is a type of set of string
  tags = var.tags

  dynamic "policy_statements" {
    for_each = var.policy_statements
    content {
      # actions - (optional) is a type of list of string
      actions = policy_statements.value["actions"]
      # effect - (required) is a type of string
      effect = policy_statements.value["effect"]
      # not_actions - (optional) is a type of list of string
      not_actions = policy_statements.value["not_actions"]
      # not_resources - (optional) is a type of list of string
      not_resources = policy_statements.value["not_resources"]
      # resources - (optional) is a type of list of string
      resources = policy_statements.value["resources"]
    }
  }

}

top

Outputs

output "enabled" {
  description = "returns a bool"
  value       = data.launchdarkly_webhook.this.enabled
}

output "id" {
  description = "returns a string"
  value       = data.launchdarkly_webhook.this.id
}

output "url" {
  description = "returns a string"
  value       = data.launchdarkly_webhook.this.url
}

output "this" {
  value = launchdarkly_webhook.this
}

top