-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* packages * prg * prg * sets, map * test * api change * datadog test * slack test * segment test * markdown, tests
- Loading branch information
1 parent
dabf8d9
commit 6b90dce
Showing
46 changed files
with
1,548 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "configcat_integration Resource - terraform-provider-configcat" | ||
subcategory: "" | ||
description: |- | ||
Creates and manages an Integration. Read more about Integrations in ConfigCat https://configcat.com/docs/integrations/overview/ | ||
--- | ||
|
||
# configcat_integration (Resource) | ||
|
||
Creates and manages an **Integration**. [Read more about Integrations in ConfigCat](https://configcat.com/docs/integrations/overview/) | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
variable "product_id" { | ||
type = string | ||
} | ||
variable "config_id" { | ||
type = string | ||
} | ||
variable "environment_id" { | ||
type = string | ||
} | ||
# Configure connected configs and environments | ||
resource "configcat_integration" "slack_integration_with_configs_and_environments" { | ||
product_id = var.product_id | ||
integration_type = "slack" | ||
name = "Slack integration" | ||
parameters = { | ||
"incoming_webhook.url" = "https://mycompany.slack.com/services/B0000000000" | ||
} | ||
configs = [var.config_id] | ||
environments = [var.environment_id] | ||
} | ||
# Slack integration (https://configcat.com/docs/integrations/slack/) | ||
resource "configcat_integration" "slack_integration" { | ||
product_id = var.product_id | ||
integration_type = "slack" | ||
name = "Slack integration" | ||
parameters = { | ||
"incoming_webhook.url" = "https://mycompany.slack.com/services/B0000000000" # The incoming webhook URL where the integration should post messages. Read more at https://api.slack.com/messaging/webhooks. | ||
} | ||
} | ||
# Datadog integration (https://configcat.com/docs/integrations/datadog/) | ||
resource "configcat_integration" "datadog_integration" { | ||
product_id = var.product_id | ||
integration_type = "dataDog" | ||
name = "Datadog integration" | ||
parameters = { | ||
"apikey" = "" # Datadog API key. Read more at https://docs.datadoghq.com/account_management/api-app-keys/#api-keys | ||
"site" = "Us" # Optional. Datadog site. Available values: Us, Eu, Us1Fed, Us3, Us5. Default: Us. Read more at https://docs.datadoghq.com/getting_started/site/. | ||
} | ||
} | ||
# Amplitude integration (https://configcat.com/docs/integrations/amplitude/#annotations) | ||
resource "configcat_integration" "amplitude_integration" { | ||
product_id = var.product_id | ||
integration_type = "amplitude" | ||
name = "Amplitude integration" | ||
parameters = { | ||
"apikey" = "" # Amplitude API Key. Read more at https://amplitude.com/docs/apis/authentication. | ||
"secretKey" = "" # Amplitude Secret Key. Read more at https://amplitude.com/docs/apis/authentication. | ||
} | ||
} | ||
# Mixpanel integration (https://configcat.com/docs/integrations/mixpanel/#annotations) | ||
resource "configcat_integration" "mixpanel_integration" { | ||
product_id = var.product_id | ||
integration_type = "mixPanel" | ||
name = "Mixpanel integration" | ||
parameters = { | ||
"serviceAccountUserName" = "" # Mixpanel Service Account Username. | ||
"serviceAccountSecret" = "" # Mixpanel Service Account Secret. | ||
"projectId" = "" # Mixpanel Service Account Secret. | ||
"server" = "StandardServer" # Mixpanel Server. Available values: StandardServer, EUResidencyServer. Default: StandardServer. Read more at https://docs.mixpanel.com/docs/privacy/eu-residency. | ||
} | ||
} | ||
# Segment integration (https://configcat.com/docs/integrations/segment/#changeevents) | ||
resource "configcat_integration" "mixpanel_integration" { | ||
product_id = var.product_id | ||
integration_type = "segment" | ||
name = "Mixpanel integration" | ||
parameters = { | ||
"writeKey" = "" # Twilio Segment Write Key. | ||
"server" = "StandardServer" # Twilio Segment Server. Available values: Us, Eu. Default: Us. Read more at https://segment.com/docs/guides/regional-segment/. | ||
} | ||
} | ||
output "slack_integration_id" { | ||
value = configcat_integration.slack_integration.id | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `integration_type` (String) The integration type of the Integration. Possible values: `dataDog`, `slack`, `amplitude`, `mixPanel`, `segment`, `pubNub`. | ||
- `name` (String) The name of the Integration. | ||
- `product_id` (String) The ID of the Product. | ||
|
||
### Optional | ||
|
||
- `configs` (Set of String) List of Config IDs that are connected with this Integration. If the list is empty, all of the Configs are connected. | ||
- `environments` (Set of String) List of Environment IDs that are connected with this Integration. If the list is empty, all of the Environments are connected. | ||
- `parameters` (Map of String) Parameters of the integration. The Parameters dictionary differs for each IntegrationType. See available options per integration type at the examples. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The unique ID of the Integration. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# Integrations can be imported using the IntegrationId. Get the IntegrationId using the [List Integrations API](https://api.configcat.com/docs/index.html#tag/Integrations/operation/get-integrations) for example. | ||
|
||
terraform import configcat_integration.example 08d86d63-2726-47cd-8bfc-59608ecb91e2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Integrations can be imported using the IntegrationId. Get the IntegrationId using the [List Integrations API](https://api.configcat.com/docs/index.html#tag/Integrations/operation/get-integrations) for example. | ||
|
||
terraform import configcat_integration.example 08d86d63-2726-47cd-8bfc-59608ecb91e2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
variable "product_id" { | ||
type = string | ||
} | ||
|
||
variable "config_id" { | ||
type = string | ||
} | ||
|
||
variable "environment_id" { | ||
type = string | ||
} | ||
|
||
# Configure connected configs and environments | ||
resource "configcat_integration" "slack_integration_with_configs_and_environments" { | ||
product_id = var.product_id | ||
integration_type = "slack" | ||
name = "Slack integration" | ||
parameters = { | ||
"incoming_webhook.url" = "https://mycompany.slack.com/services/B0000000000" | ||
} | ||
|
||
configs = [var.config_id] | ||
environments = [var.environment_id] | ||
} | ||
|
||
# Slack integration (https://configcat.com/docs/integrations/slack/) | ||
resource "configcat_integration" "slack_integration" { | ||
product_id = var.product_id | ||
integration_type = "slack" | ||
name = "Slack integration" | ||
parameters = { | ||
"incoming_webhook.url" = "https://mycompany.slack.com/services/B0000000000" # The incoming webhook URL where the integration should post messages. Read more at https://api.slack.com/messaging/webhooks. | ||
} | ||
} | ||
|
||
# Datadog integration (https://configcat.com/docs/integrations/datadog/) | ||
resource "configcat_integration" "datadog_integration" { | ||
product_id = var.product_id | ||
integration_type = "dataDog" | ||
name = "Datadog integration" | ||
parameters = { | ||
"apikey" = "" # Datadog API key. Read more at https://docs.datadoghq.com/account_management/api-app-keys/#api-keys | ||
"site" = "Us" # Optional. Datadog site. Available values: Us, Eu, Us1Fed, Us3, Us5. Default: Us. Read more at https://docs.datadoghq.com/getting_started/site/. | ||
} | ||
} | ||
|
||
# Amplitude integration (https://configcat.com/docs/integrations/amplitude/#annotations) | ||
resource "configcat_integration" "amplitude_integration" { | ||
product_id = var.product_id | ||
integration_type = "amplitude" | ||
name = "Amplitude integration" | ||
parameters = { | ||
"apikey" = "" # Amplitude API Key. Read more at https://amplitude.com/docs/apis/authentication. | ||
"secretKey" = "" # Amplitude Secret Key. Read more at https://amplitude.com/docs/apis/authentication. | ||
} | ||
} | ||
|
||
# Mixpanel integration (https://configcat.com/docs/integrations/mixpanel/#annotations) | ||
resource "configcat_integration" "mixpanel_integration" { | ||
product_id = var.product_id | ||
integration_type = "mixPanel" | ||
name = "Mixpanel integration" | ||
parameters = { | ||
"serviceAccountUserName" = "" # Mixpanel Service Account Username. | ||
"serviceAccountSecret" = "" # Mixpanel Service Account Secret. | ||
"projectId" = "" # Mixpanel Service Account Secret. | ||
"server" = "StandardServer" # Mixpanel Server. Available values: StandardServer, EUResidencyServer. Default: StandardServer. Read more at https://docs.mixpanel.com/docs/privacy/eu-residency. | ||
} | ||
} | ||
|
||
# Segment integration (https://configcat.com/docs/integrations/segment/#changeevents) | ||
resource "configcat_integration" "mixpanel_integration" { | ||
product_id = var.product_id | ||
integration_type = "segment" | ||
name = "Mixpanel integration" | ||
parameters = { | ||
"writeKey" = "" # Twilio Segment Write Key. | ||
"server" = "StandardServer" # Twilio Segment Server. Available values: Us, Eu. Default: Us. Read more at https://segment.com/docs/guides/regional-segment/. | ||
} | ||
} | ||
|
||
output "slack_integration_id" { | ||
value = configcat_integration.slack_integration.id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.