diff --git a/README.md b/README.md index 8f05268d..c4e61d59 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,7 @@ $EDITOR jupiterone/internal/client/.graphql # save the updated schema the first time export JUPITERONE_ACCOUNT=:your_account_id export JUPITERONE_API_KEY=:your_api_key +export JUPITERONE_REGION=us yarn add graphql make generate-client @@ -66,7 +67,7 @@ make generate-client In order to test the provider, you can simply run `make testacc`. Pre-recorded API responses (cassettes) are read in from -[jupiterone/cassettes/*.yaml](jupiterone/cassettes) files and returned. When +[jupiterone/cassettes/\*.yaml](jupiterone/cassettes) files and returned. When tests are modified, the cassettes need to be re-recorded. _Note:_ Recording cassettes creates/updates/destroys real resources. Never run this on @@ -80,6 +81,7 @@ To re-record _all_ cassettes: ```sh export JUPITERONE_ACCOUNT_ID=your-account-id export JUPITERONE_API_KEY=xxxxxx +export JUPITERONE_REGION=us make cassettes ``` @@ -91,6 +93,7 @@ functionality. ```sh export JUPITERONE_ACCOUNT_ID=your-account-id export JUPITERONE_API_KEY=xxxxxx +export JUPITERONE_REGION=us rm jupiterone/cassettes/:some-test.yaml make testacc ``` diff --git a/docs/index.md b/docs/index.md index 1332f0c1..554a324a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,8 +13,9 @@ The JupiterOne provider provides resources to interact with a JupiterOne API. ```terraform provider "jupiterone" { - api_key = "${var.jupiterone_api_key}" - account_id = "${var.jupiterone_account}" + api_key = var.jupiterone_api_key + account_id = var.jupiterone_account + region = var.jupiterone_region } ``` @@ -25,4 +26,4 @@ provider "jupiterone" { - `account_id` (String) JupiterOne account ID to create resources in - `api_key` (String, Sensitive) API Key used to make requests to the JupiterOne APIs -- `region` (String) \ No newline at end of file +- `region` (String) region used for generating the GraphQL endpoint url. If not provided defaults to 'us' \ No newline at end of file diff --git a/docs/resources/question.md b/docs/resources/question.md index 141ded9d..d1154768 100644 --- a/docs/resources/question.md +++ b/docs/resources/question.md @@ -39,7 +39,7 @@ resource "jupiterone_question" "unencrypted_critical_data_stores" { - `compliance` (Block List) (see [below for nested schema](#nestedblock--compliance)) - `polling_interval` (String) Frequency of automated question evaluation. Defaults to ONE_DAY. - `query` (Block List) (see [below for nested schema](#nestedblock--query)) -- `show_trend` (Boolean) Whether to enable trend data collection. Defaults to false. +- `show_trend` (Boolean) Whether to enable daily trend data collection. Defaults to false. - `tags` (List of String) ### Read-Only diff --git a/docs/resources/rule.md b/docs/resources/rule.md index abd4cdcd..b787f75a 100644 --- a/docs/resources/rule.md +++ b/docs/resources/rule.md @@ -114,10 +114,10 @@ resource "jupiterone_rule" "users_without_mfa" { - `polling_interval` (String) Frequency of automated rule evaluation. Defaults to ONE_DAY. - `question` (Block List) Contains properties related to queries used in the rule evaluation. (see [below for nested schema](#nestedblock--question)) - `question_id` (String) Specifies the ID of a question to be used in rule evaluation. -- `question_name` (String, Deprecated) Specifies the name of a question to be used in rule evaluation. - `spec_version` (Number) Rule evaluation specification version in the case of breaking changes. - `tags` (List of String) Comma separated list of tags to apply to the rule. - `templates` (Map of String) Optional key/value pairs of template name to template +- `trigger_on_new_only` (Boolean) ### Read-Only diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 42e761e5..cd62a459 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -1,4 +1,5 @@ provider "jupiterone" { - api_key = "${var.jupiterone_api_key}" - account_id = "${var.jupiterone_account}" -} \ No newline at end of file + api_key = var.jupiterone_api_key + account_id = var.jupiterone_account + region = var.jupiterone_region +} diff --git a/jupiterone/provider.go b/jupiterone/provider.go index 4c686cf4..bab1b309 100644 --- a/jupiterone/provider.go +++ b/jupiterone/provider.go @@ -154,7 +154,8 @@ func (*JupiterOneProvider) Schema(ctx context.Context, req provider.SchemaReques Description: "JupiterOne account ID to create resources in", }, "region": schema.StringAttribute{ - Optional: true, + Optional: true, + Description: "region used for generating the GraphQL endpoint url. If not provided defaults to 'us'", }, }, }