generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement connection and subscription resources for jira and slack. (#…
…1116) Implement connection and subscription resources for jira and slack.
- Loading branch information
1 parent
cd7cff2
commit b52e294
Showing
26 changed files
with
1,715 additions
and
7 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,7 @@ | ||
```release-note:feature | ||
Add preview of the following Vault Radar connections and subscriptions: | ||
hcp_vault_radar_integration_jira_connection | ||
hcp_vault_radar_integration_jira_subscription | ||
hcp_vault_radar_integration_slack_connection | ||
hcp_vault_radar_integration_slack_subscription | ||
``` |
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,47 @@ | ||
--- | ||
page_title: "hcp_vault_radar_integration_jira_connection Resource - terraform-provider-hcp" | ||
subcategory: "" | ||
description: |- | ||
This terraform resource manages an Integration Jira Connection in Vault Radar. | ||
--- | ||
|
||
# hcp_vault_radar_integration_jira_connection (Resource) | ||
|
||
-> **Note:** HCP Vault Radar Terraform resources are in preview. | ||
|
||
This terraform resource manages an Integration Jira Connection in Vault Radar. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
variable "jira_token" { | ||
type = string | ||
sensitive = true | ||
} | ||
resource "hcp_vault_radar_integration_jira_connection" "jira_connection" { | ||
name = "example connection to jira" | ||
email = "[email protected]" | ||
token = var.jira_token | ||
base_url = "https://example.atlassian.net" | ||
} | ||
``` | ||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `base_url` (String) The Jira base URL. Example: https://acme.atlassian.net | ||
- `email` (String, Sensitive) Jira user's email. | ||
- `name` (String) Name of connection. Name must be unique. | ||
- `token` (String, Sensitive) A Jira API token. | ||
|
||
### Optional | ||
|
||
- `project_id` (String) The ID of the HCP project where Vault Radar is located. If not specified, the project specified in the HCP Provider config block will be used, if configured. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. |
59 changes: 59 additions & 0 deletions
59
docs/resources/vault_radar_integration_jira_subscription.md
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,59 @@ | ||
--- | ||
page_title: "hcp_vault_radar_integration_jira_subscription Resource - terraform-provider-hcp" | ||
subcategory: "" | ||
description: |- | ||
This terraform resource manages an Integration Jira Subscription in Vault Radar. | ||
--- | ||
|
||
# hcp_vault_radar_integration_jira_subscription (Resource) | ||
|
||
-> **Note:** HCP Vault Radar Terraform resources are in preview. | ||
|
||
This terraform resource manages an Integration Jira Subscription in Vault Radar. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
variable "jira_token" { | ||
type = string | ||
sensitive = true | ||
} | ||
# A Jira subscription requires a Jira connection. | ||
resource "hcp_vault_radar_integration_jira_connection" "jira_connection" { | ||
name = "example integration jira connection" | ||
email = "[email protected]" | ||
token = var.jira_token | ||
base_url = "https://example.atlassian.net" | ||
} | ||
resource "hcp_vault_radar_integration_jira_subscription" "jira_subscription" { | ||
name = "example integration jira subscription" | ||
connection_id = hcp_vault_radar_integration_jira_connection.jira_connection.id | ||
jira_project_key = "SEC" | ||
issue_type = "Task" | ||
assignee = "71509:11bb945b-c0de-4bac-9d57-9f09db2f7bc9" | ||
message = "Example message" | ||
} | ||
``` | ||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `connection_id` (String) id of the integration jira connection to use for the subscription. | ||
- `issue_type` (String) The type of issue to be created from the event(s). Example: Task | ||
- `jira_project_key` (String) The name of the project under which the jira issue will be created. Example: OPS | ||
- `name` (String) Name of subscription. Name must be unique. | ||
|
||
### Optional | ||
|
||
- `assignee` (String) The identifier of the Jira user who will be assigned the ticket. In case of Jira Cloud, this will be the Atlassian Account ID of the user. Example: 71509:11bb945b-c0de-4bac-9d57-9f09db2f7bc9 | ||
- `message` (String) This message will be included in the ticket description. | ||
- `project_id` (String) The ID of the HCP project where Vault Radar is located. If not specified, the project specified in the HCP Provider config block will be used, if configured. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. |
43 changes: 43 additions & 0 deletions
43
docs/resources/vault_radar_integration_slack_connection.md
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,43 @@ | ||
--- | ||
page_title: "hcp_vault_radar_integration_slack_connection Resource - terraform-provider-hcp" | ||
subcategory: "" | ||
description: |- | ||
This terraform resource manages an Integration Slack Connection in Vault Radar. | ||
--- | ||
|
||
# hcp_vault_radar_integration_slack_connection (Resource) | ||
|
||
-> **Note:** HCP Vault Radar Terraform resources are in preview. | ||
|
||
This terraform resource manages an Integration Slack Connection in Vault Radar. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
variable "slack_token" { | ||
type = string | ||
sensitive = true | ||
} | ||
resource "hcp_vault_radar_integration_slack_connection" "slack_connection" { | ||
name = "example connection to slack" | ||
token = var.slack_token | ||
} | ||
``` | ||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Name of connection. Name must be unique. | ||
- `token` (String, Sensitive) Slack bot user OAuth token. Example: Bot token strings begin with 'xoxb'. | ||
|
||
### Optional | ||
|
||
- `project_id` (String) The ID of the HCP project where Vault Radar is located. If not specified, the project specified in the HCP Provider config block will be used, if configured. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. |
51 changes: 51 additions & 0 deletions
51
docs/resources/vault_radar_integration_slack_subscription.md
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,51 @@ | ||
--- | ||
page_title: "hcp_vault_radar_integration_slack_subscription Resource - terraform-provider-hcp" | ||
subcategory: "" | ||
description: |- | ||
This terraform resource manages an Integration Slack Subscription in Vault Radar. | ||
--- | ||
|
||
# hcp_vault_radar_integration_slack_subscription (Resource) | ||
|
||
-> **Note:** HCP Vault Radar Terraform resources are in preview. | ||
|
||
This terraform resource manages an Integration Slack Subscription in Vault Radar. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
variable "slack_token" { | ||
type = string | ||
sensitive = true | ||
} | ||
# A Slack subscription requires a Slack connection. | ||
resource "hcp_vault_radar_integration_slack_connection" "slack_connection" { | ||
name = "example connection to slack" | ||
token = var.slack_token | ||
} | ||
resource "hcp_vault_radar_integration_slack_subscription" "slack_subscription" { | ||
name = "example integration slack subscription" | ||
connection_id = hcp_vault_radar_integration_slack_connection.slack_connection.id | ||
channel = "sec-ops-team" | ||
} | ||
``` | ||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `channel` (String) Name of the Slack channel that messages should be sent to. Note that HashiCorp Vault Radar will send a test message to verify the channel. Example: dev-ops-team | ||
- `connection_id` (String) id of the integration slack connection to use for the subscription. | ||
- `name` (String) Name of subscription. Name must be unique. | ||
|
||
### Optional | ||
|
||
- `project_id` (String) The ID of the HCP project where Vault Radar is located. If not specified, the project specified in the HCP Provider config block will be used, if configured. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. |
11 changes: 11 additions & 0 deletions
11
examples/resources/hcp_vault_radar_integration_jira_connection/resource.tf
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,11 @@ | ||
variable "jira_token" { | ||
type = string | ||
sensitive = true | ||
} | ||
|
||
resource "hcp_vault_radar_integration_jira_connection" "jira_connection" { | ||
name = "example connection to jira" | ||
email = "[email protected]" | ||
token = var.jira_token | ||
base_url = "https://example.atlassian.net" | ||
} |
21 changes: 21 additions & 0 deletions
21
examples/resources/hcp_vault_radar_integration_jira_subscription/resource.tf
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,21 @@ | ||
variable "jira_token" { | ||
type = string | ||
sensitive = true | ||
} | ||
|
||
# A Jira subscription requires a Jira connection. | ||
resource "hcp_vault_radar_integration_jira_connection" "jira_connection" { | ||
name = "example integration jira connection" | ||
email = "[email protected]" | ||
token = var.jira_token | ||
base_url = "https://example.atlassian.net" | ||
} | ||
|
||
resource "hcp_vault_radar_integration_jira_subscription" "jira_subscription" { | ||
name = "example integration jira subscription" | ||
connection_id = hcp_vault_radar_integration_jira_connection.jira_connection.id | ||
jira_project_key = "SEC" | ||
issue_type = "Task" | ||
assignee = "71509:11bb945b-c0de-4bac-9d57-9f09db2f7bc9" | ||
message = "Example message" | ||
} |
9 changes: 9 additions & 0 deletions
9
examples/resources/hcp_vault_radar_integration_slack_connection/resource.tf
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,9 @@ | ||
variable "slack_token" { | ||
type = string | ||
sensitive = true | ||
} | ||
|
||
resource "hcp_vault_radar_integration_slack_connection" "slack_connection" { | ||
name = "example connection to slack" | ||
token = var.slack_token | ||
} |
16 changes: 16 additions & 0 deletions
16
examples/resources/hcp_vault_radar_integration_slack_subscription/resource.tf
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,16 @@ | ||
variable "slack_token" { | ||
type = string | ||
sensitive = true | ||
} | ||
|
||
# A Slack subscription requires a Slack connection. | ||
resource "hcp_vault_radar_integration_slack_connection" "slack_connection" { | ||
name = "example connection to slack" | ||
token = var.slack_token | ||
} | ||
|
||
resource "hcp_vault_radar_integration_slack_subscription" "slack_subscription" { | ||
name = "example integration slack subscription" | ||
connection_id = hcp_vault_radar_integration_slack_connection.slack_connection.id | ||
channel = "sec-ops-team" | ||
} |
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.