-
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.
* chore: format updates * chore: update dependencies * chore: add http source full example * feat: add generated code and http resource * feat: add http model and refactor client code * chore: use correct model in client and remove id * chore: remove json tags * fix: use id from state to call update and restore id * chore: fix update, use integration id only * chore: use id instead of integration_id * chore: use authorized client and consolidate model, generic url and backwards compatibility * chore: update README, docs and add acc test for httpsource resource * fix: use state from unknown, default values, update state on read, acceptance test * chore: override schema with defaults instead of setting defaults before call * feat: add import state functionality * chore: update go.mod and readme * chore: update go version in gh actions * lint * remove redundant examples and add to examples README * fix links in readme * chore: put back example files to generate docs * update readme * cleanup and change provider address * chore: fixes from PR comments * fix: add terraform install action * fix: restore s3 minor changes * chore: update id field name and remove redundant json tag * chore: fix readme, return value instead of pointer and error message * feat: use new openapi spec to update provider spec and model * update model, resource and test * update docs * update examples and fix bearer issue with Read * minor update to README * remove url util func * remove redundant install terraform step
- Loading branch information
1 parent
6019d28
commit 4f1227f
Showing
21 changed files
with
1,336 additions
and
330 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
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,33 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "panther_httpsource Resource - terraform-provider-panther" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# panther_httpsource (Resource) | ||
|
||
|
||
|
||
|
||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `auth_method` (String) The authentication method of the http source | ||
- `integration_label` (String) The integration label (name) | ||
- `log_stream_type` (String) The log stream type | ||
- `log_types` (List of String) The log types of the integration | ||
|
||
### Optional | ||
|
||
- `auth_bearer_token` (String) The authentication bearer token value of the http source. Used for Bearer auth method | ||
- `auth_header_key` (String) The authentication header key of the http source. Used for HMAC and SharedSecret auth methods | ||
- `auth_hmac_alg` (String) The authentication algorithm of the http source. Used for HMAC auth method | ||
- `auth_password` (String) The authentication header password of the http source. Used for Basic auth method | ||
- `auth_secret_value` (String) The authentication header secret value of the http source. Used for HMAC and SharedSecret auth methods | ||
- `auth_username` (String) The authentication header username of the http source. Used for Basic auth method | ||
- `id` (String) ID of the http source to fetch |
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,8 @@ | ||
resource "panther_httpsource" "example_http_source" { | ||
integration_label = var.integration_label | ||
log_stream_type = var.log_stream_type | ||
log_types = var.log_types | ||
auth_method = var.auth_method | ||
auth_header_key = var.auth_header_key | ||
auth_secret_value = var.auth_secret_value | ||
} |
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,13 @@ | ||
terraform { | ||
required_version = ">= 1.0" | ||
required_providers { | ||
panther = { | ||
source = "panther-labs/panther" | ||
} | ||
} | ||
} | ||
|
||
provider "panther" { | ||
token = var.token | ||
url = var.url | ||
} |
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,4 @@ | ||
output "log-source-id" { | ||
description = "http Log Source id" | ||
value = panther_httpsource.example_http_source.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
variable "token" { | ||
description = "Panther API token" | ||
type = string | ||
} | ||
|
||
variable "url" { | ||
description = "Panther API URL" | ||
type = string | ||
} | ||
|
||
variable "integration_label" { | ||
description = "The name of the integration." | ||
type = string | ||
} | ||
|
||
variable "log_stream_type" { | ||
description = "Type of log stream." | ||
type = string | ||
} | ||
|
||
variable "log_types" { | ||
description = "List of log types for the HTTP source." | ||
type = list(string) | ||
} | ||
|
||
variable "auth_method" { | ||
description = "Authentication method used." | ||
type = string | ||
} | ||
|
||
variable "auth_header_key" { | ||
description = "Key for the authentication header." | ||
type = string | ||
} | ||
|
||
variable "auth_secret_value" { | ||
description = "Authentication secret value." | ||
type = string | ||
sensitive = true | ||
} |
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,13 @@ | ||
# Manage Http Log Source integration | ||
resource "panther_http_source" "example_http_source" { | ||
integration_label = "" | ||
log_stream_type = "JSON" | ||
log_types = "" | ||
auth_method = "SharedSecret" | ||
auth_header_key = "" | ||
auth_secret_value = "" | ||
auth_username = "" | ||
auth_password = "" | ||
auth_hmac_alg = "" | ||
auth_bearer_token = "" | ||
} |
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,19 @@ | ||
provider: | ||
name: panther | ||
resources: | ||
httpsource: | ||
create: | ||
path: /log-sources/http | ||
method: POST | ||
read: | ||
path: /log-sources/http/{id} | ||
method: GET | ||
update: | ||
path: /log-sources/http/{id} | ||
method: PUT | ||
delete: | ||
path: /log-sources/http/{id} | ||
method: DELETE | ||
schema: | ||
ignores: | ||
- integrationId |
Oops, something went wrong.