-
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.
⭐️ new resource mondoo_integration_shodan (#141)
* ⭐️ new resource `mondoo_integration_shodan` You can now setup the Shodan integration with Mondoo: ```hcl resource "mondoo_integration_shodan" "shodan_integration" { space_id = mondoo_space.shodan_space.id name = "Shodan Integration" targets = ["8.8.8.8", "mondoo.com"] credentials = { token = var.shodan_token } } ``` Signed-off-by: Salim Afiune Maya <[email protected]> * 🧹 make sensitive variables sensitive Signed-off-by: Salim Afiune Maya <[email protected]> * 🔄 update mondoo-go dependency Signed-off-by: Salim Afiune Maya <[email protected]> * 🩷 add unit tests Signed-off-by: Salim Afiune Maya <[email protected]> --------- Signed-off-by: Salim Afiune Maya <[email protected]>
- Loading branch information
Showing
20 changed files
with
692 additions
and
89 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,69 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "mondoo_integration_shodan Resource - terraform-provider-mondoo" | ||
subcategory: "" | ||
description: |- | ||
Continuously scan Internet-connected devices with Shodan. | ||
--- | ||
|
||
# mondoo_integration_shodan (Resource) | ||
|
||
Continuously scan Internet-connected devices with Shodan. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
variable "mondoo_org" { | ||
description = "The Mondoo Organization ID" | ||
type = string | ||
} | ||
variable "shodan_token" { | ||
description = "The Shodan Token" | ||
type = string | ||
sensitive = true | ||
} | ||
provider "mondoo" { | ||
region = "us" | ||
} | ||
# Create a new space | ||
resource "mondoo_space" "shodan_space" { | ||
name = "My Shodan Space Name" | ||
org_id = var.mondoo_org | ||
} | ||
# Setup the Shodan integration | ||
resource "mondoo_integration_shodan" "shodan_integration" { | ||
space_id = mondoo_space.shodan_space.id | ||
name = "Shodan Integration" | ||
targets = ["8.8.8.8", "mondoo.com"] | ||
credentials = { | ||
token = var.shodan_token | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `credentials` (Attributes) (see [below for nested schema](#nestedatt--credentials)) | ||
- `name` (String) Name of the integration. | ||
- `space_id` (String) Mondoo Space Identifier. | ||
- `targets` (List of String) Shodan scan targets. | ||
|
||
### Read-Only | ||
|
||
- `mrn` (String) Integration identifier | ||
|
||
<a id="nestedatt--credentials"></a> | ||
### Nested Schema for `credentials` | ||
|
||
Required: | ||
|
||
- `token` (String, Sensitive) Token for Shodan integration. |
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,9 @@ | ||
terraform { | ||
required_providers { | ||
mondoo = { | ||
source = "mondoohq/mondoo" | ||
version = ">= 0.5" | ||
} | ||
} | ||
} | ||
|
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,32 @@ | ||
variable "mondoo_org" { | ||
description = "The Mondoo Organization ID" | ||
type = string | ||
} | ||
|
||
variable "shodan_token" { | ||
description = "The Shodan Token" | ||
type = string | ||
sensitive = true | ||
} | ||
|
||
provider "mondoo" { | ||
region = "us" | ||
} | ||
|
||
# Create a new space | ||
resource "mondoo_space" "shodan_space" { | ||
name = "My Shodan Space Name" | ||
org_id = var.mondoo_org | ||
} | ||
|
||
# Setup the Shodan integration | ||
resource "mondoo_integration_shodan" "shodan_integration" { | ||
space_id = mondoo_space.shodan_space.id | ||
name = "Shodan Integration" | ||
|
||
targets = ["8.8.8.8", "mondoo.com"] | ||
|
||
credentials = { | ||
token = var.shodan_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
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.