-
Notifications
You must be signed in to change notification settings - Fork 27
feat: add AI configs support to terraform provider #368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
cbbe7cb
23525cd
e732834
027a42a
71d747b
bc7210e
93cc56f
bc418c8
dd15caf
eb633f6
263932b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 1.22.9 | ||
| 1.23.5 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,37 @@ | ||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||||||||||||||||||||||||||||||
| page_title: "launchdarkly_ai_config Data Source - launchdarkly" | ||||||||||||||||||||||||||||||
| subcategory: "" | ||||||||||||||||||||||||||||||
| description: |- | ||||||||||||||||||||||||||||||
| Provides a LaunchDarkly AI config data source. | ||||||||||||||||||||||||||||||
| This data source allows you to retrieve AI config information from your LaunchDarkly project. | ||||||||||||||||||||||||||||||
| -> Note: AI Configs are currently in beta. | ||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| # launchdarkly_ai_config (Data Source) | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| Provides a LaunchDarkly AI config data source. | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| This data source allows you to retrieve AI config information from your LaunchDarkly project. | ||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||
| Provides a LaunchDarkly AI config data source. | |
| This data source allows you to retrieve AI config information from your LaunchDarkly project. | |
| Provides a LaunchDarkly AI Config data source. | |
| This data source allows you to retrieve AI Config information from your LaunchDarkly project. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - `key` (String) The unique key of the AI config. | |
| - `key` (String) The unique key of the AI Config. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - `description` (String) The description of the AI config. | |
| - `id` (String) The ID of this resource. | |
| - `maintainer_id` (String) The ID of the member who maintains this AI config. | |
| - `maintainer_team_key` (String) The key of the team that maintains this AI config. | |
| - `name` (String) The human-readable name of the AI config. | |
| - `tags` (Set of String) Tags associated with the AI config. | |
| - `version` (Number) The version of the AI config. | |
| - `description` (String) The description of the AI Config. | |
| - `id` (String) The ID of this resource. | |
| - `maintainer_id` (String) The ID of the member who maintains this AI Config. | |
| - `maintainer_team_key` (String) The key of the team that maintains this AI Config. | |
| - `name` (String) The human-readable name of the AI Config. | |
| - `tags` (Set of String) Tags associated with the AI Config. | |
| - `version` (Number) The version of the AI Config. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -28,7 +28,7 @@ data "launchdarkly_audit_log_subscription" "test" { | |||||
| ### Required | ||||||
|
|
||||||
| - `id` (String) The audit log subscription ID. | ||||||
| - `integration_key` (String) The integration key. Supported integration keys are `chronosphere`, `cloudtrail`, `datadog`, `dynatrace`, `dynatrace-v2`, `elastic`, `grafana`, `honeycomb`, `kosli`, `last9`, `logdna`, `msteams`, `new-relic-apm`, `pagerduty`, `signalfx`, `slack`, and `splunk`. | ||||||
| - `integration_key` (String) The integration key. Supported integration keys are `slack`. | ||||||
|
||||||
| - `integration_key` (String) The integration key. Supported integration keys are `slack`. | |
| - `integration_key` (String) The integration key. Supported integration key is `slack`. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -47,7 +47,7 @@ Please note that if you did not save this upon creation of the resource, you wil | |||||
|
|
||||||
| - `enabled` (Boolean) Whether the trigger is currently active or not. | ||||||
| - `instructions` (List of Object) Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are `turnFlagOn` and `turnFlagOff`. This must be passed as the key-value pair `{ kind = "<flag_action>" }`. (see [below for nested schema](#nestedatt--instructions)) | ||||||
| - `integration_key` (String) The unique identifier of the integration you intend to set your trigger up with. Currently supported are `generic-trigger`, `datadog`, `dynatrace`, `dynatrace-cloud-automation`, `honeycomb`, `new-relic-apm`, and `signalfx`. `generic-trigger` should be used for integrations not explicitly supported. | ||||||
| - `integration_key` (String) The unique identifier of the integration you intend to set your trigger up with. Currently supported are `generic-trigger`. `generic-trigger` should be used for integrations not explicitly supported. | ||||||
|
||||||
| - `integration_key` (String) The unique identifier of the integration you intend to set your trigger up with. Currently supported are `generic-trigger`. `generic-trigger` should be used for integrations not explicitly supported. | |
| - `integration_key` (String) The unique identifier of the integration you intend to set your trigger up with. Currently supported is `generic-trigger`. You should use `generic-trigger` for integrations not explicitly supported. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,40 @@ | ||||||||||||||||||
| --- | ||||||||||||||||||
| # generated by https://github.com/hashicorp/terraform-plugin-docs | ||||||||||||||||||
| page_title: "launchdarkly_ai_config Resource - launchdarkly" | ||||||||||||||||||
| subcategory: "" | ||||||||||||||||||
| description: |- | ||||||||||||||||||
| Provides a LaunchDarkly AI config resource. | ||||||||||||||||||
| This resource allows you to create and manage AI configs within your LaunchDarkly project. | ||||||||||||||||||
|
||||||||||||||||||
| Provides a LaunchDarkly AI config resource. | |
| This resource allows you to create and manage AI configs within your LaunchDarkly project. | |
| Provides a LaunchDarkly AI Config resource. | |
| This resource allows you to create and manage AI Configs within your LaunchDarkly project. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Provides a LaunchDarkly AI config resource. | |
| This resource allows you to create and manage AI configs within your LaunchDarkly project. | |
| Provides a LaunchDarkly AI Config resource. | |
| This resource allows you to create and manage AI Configs within your LaunchDarkly project. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - `key` (String) The unique key of the AI config. | |
| - `name` (String) The human-readable name of the AI config. | |
| - `key` (String) The unique key of the AI Config. | |
| - `name` (String) The human-readable name of the AI Config. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - `description` (String) The description of the AI config. | |
| - `maintainer_id` (String) The ID of the member who maintains this AI config. | |
| - `maintainer_team_key` (String) The key of the team that maintains this AI config. | |
| - `tags` (Set of String) Tags associated with the AI config. | |
| - `description` (String) The description of the AI Config. | |
| - `maintainer_id` (String) The ID of the member who maintains this AI Config. | |
| - `maintainer_team_key` (String) The key of the team that maintains this AI Config. | |
| - `tags` (Set of String) Tags associated with the AI Config. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - `version` (Number) The version of the AI config. | |
| - `version` (Number) The version of the AI Config. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -41,7 +41,7 @@ resource "launchdarkly_audit_log_subscription" "example" { | |||||
| ### Required | ||||||
|
|
||||||
| - `config` (Map of String) The set of configuration fields corresponding to the value defined for `integration_key`. Refer to the `formVariables` field in the corresponding `integrations/<integration_key>/manifest.json` file in [this repo](https://github.com/launchdarkly/integration-framework/tree/master/integrations) for a full list of fields for the integration you wish to configure. **IMPORTANT**: Please note that Terraform will only accept these in snake case, regardless of the case shown in the manifest. | ||||||
| - `integration_key` (String) The integration key. Supported integration keys are `chronosphere`, `cloudtrail`, `datadog`, `dynatrace`, `dynatrace-v2`, `elastic`, `grafana`, `honeycomb`, `kosli`, `last9`, `logdna`, `msteams`, `new-relic-apm`, `pagerduty`, `signalfx`, `slack`, and `splunk`. A change in this field will force the destruction of the existing resource and the creation of a new one. | ||||||
| - `integration_key` (String) The integration key. Supported integration keys are `slack`. A change in this field will force the destruction of the existing resource and the creation of a new one. | ||||||
|
||||||
| - `integration_key` (String) The integration key. Supported integration keys are `slack`. A change in this field will force the destruction of the existing resource and the creation of a new one. | |
| - `integration_key` (String) The integration key. Supported integration key is `slack`. A change in this field will force the destruction of the existing resource and the creation of a new one. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -42,7 +42,7 @@ resource "launchdarkly_flag_trigger" "example" { | |||||
| - `env_key` (String) The unique key of the environment the flag trigger will work in. A change in this field will force the destruction of the existing resource and the creation of a new one. | ||||||
| - `flag_key` (String) The unique key of the associated flag. A change in this field will force the destruction of the existing resource and the creation of a new one. | ||||||
| - `instructions` (Block List, Min: 1, Max: 1) Instructions containing the action to perform when invoking the trigger. Currently supported flag actions are `turnFlagOn` and `turnFlagOff`. This must be passed as the key-value pair `{ kind = "<flag_action>" }`. (see [below for nested schema](#nestedblock--instructions)) | ||||||
| - `integration_key` (String) The unique identifier of the integration you intend to set your trigger up with. Currently supported are `generic-trigger`, `datadog`, `dynatrace`, `dynatrace-cloud-automation`, `honeycomb`, `new-relic-apm`, and `signalfx`. `generic-trigger` should be used for integrations not explicitly supported. A change in this field will force the destruction of the existing resource and the creation of a new one. | ||||||
| - `integration_key` (String) The unique identifier of the integration you intend to set your trigger up with. Currently supported are `generic-trigger`. `generic-trigger` should be used for integrations not explicitly supported. A change in this field will force the destruction of the existing resource and the creation of a new one. | ||||||
|
||||||
| - `integration_key` (String) The unique identifier of the integration you intend to set your trigger up with. Currently supported are `generic-trigger`. `generic-trigger` should be used for integrations not explicitly supported. A change in this field will force the destruction of the existing resource and the creation of a new one. | |
| - `integration_key` (String) The unique identifier of the integration you intend to set your trigger up with. Currently supported is `generic-trigger`. You should use `generic-trigger` for integrations not explicitly supported. A change in this field will force the destruction of the existing resource and the creation of a new one. |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,69 @@ | ||||||
| package launchdarkly | ||||||
|
|
||||||
| import ( | ||||||
| "context" | ||||||
|
|
||||||
| "github.com/hashicorp/terraform-plugin-sdk/v2/diag" | ||||||
| "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" | ||||||
| ) | ||||||
|
|
||||||
| func dataSourceAIConfig() *schema.Resource { | ||||||
| return &schema.Resource{ | ||||||
| ReadContext: dataSourceAIConfigRead, | ||||||
| Schema: map[string]*schema.Schema{ | ||||||
| PROJECT_KEY: { | ||||||
| Type: schema.TypeString, | ||||||
| Required: true, | ||||||
| Description: "The project key.", | ||||||
| }, | ||||||
| KEY: { | ||||||
| Type: schema.TypeString, | ||||||
| Required: true, | ||||||
| Description: "The unique key of the AI config.", | ||||||
|
||||||
| Description: "The unique key of the AI config.", | |
| Description: "The unique key of the AI Config.", |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Description: "The human-readable name of the AI config.", | |
| Description: "The human-readable name of the AI Config.", |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Description: "The description of the AI config.", | |
| Description: "The description of the AI Config.", |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Description: "Tags associated with the AI config.", | |
| Description: "Tags associated with the AI Config.", |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Description: "The ID of the member who maintains this AI config.", | |
| Description: "The ID of the member who maintains this AI Config.", |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Description: "The key of the team that maintains this AI config.", | |
| Description: "The key of the team that maintains this AI Config.", |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Description: "The version of the AI config.", | |
| Description: "The version of the AI Config.", |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Description: `Provides a LaunchDarkly AI config data source. | |
| Description: `Provides a LaunchDarkly AI Config data source. |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This data source allows you to retrieve AI config information from your LaunchDarkly project. | |
| This data source allows you to retrieve AI Config information from your LaunchDarkly project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.