--- # generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "wiz_connector_aws Resource - terraform-provider-wiz" subcategory: "" description: |- Connectors are used to connect AWS resources to Wiz. --- # wiz_connector_aws (Resource) Connectors are used to connect AWS resources to Wiz. ## Example Usage ```terraform # Provision a simple AWS connector, opting for a single region resource "wiz_connector_aws" "example" { name = "example" auth_params = jsonencode({ "customerRoleARN" : "arn:aws:iam::100000000009:role/wiz-customer", }) extra_config = jsonencode( { "skipOrganizationScan" : true, "optedInRegions" : ["us-east-1"], "excludedAccounts" : [], "excludedOUs" : [], "auditLogMonitorEnabled" : false } ) } # Provision an AWS connector with Outpost that uses a custom config resource "wiz_connector_aws" "example" { name = "example" auth_params = jsonencode({ "customerRoleARN" : "arn:aws:iam::100000000009:role/wiz-customer", "outpostId" : "078862d0-a62f-406c-b966-13445af34c0d", "diskAnalyzer" : { "scanner" : { "roleARN" : "arn:aws:iam::100000000009:role/outpost-scanner" } }, }) extra_config = jsonencode( { "auditLogMonitorEnabled" : false, "excludedAccounts" : ["100000000009", "100000000010", "100000000013"], "excludedOUs" : ["EXCLUDE-ME"], "auditLogMonitorEnabled" : false, "skipOrganizationScan" : true, "optedInRegions" : [], "cloudTrailConfig" : { "bucketName" : "buckethere", "bucketSubAccount" : "000000000012", "trailOrg" : "o-myorg" } } ) } ``` ## Schema ### Required - `auth_params` (String, Sensitive) The authentication parameters. Must be represented in `JSON` format. - `name` (String) The connector name. ### Optional - `enabled` (Boolean) Whether the connector is enabled. - Defaults to `true`. - `extra_config` (String) Extra configuration for the connector. Must be represented in `JSON` format. ### Read-Only - `audit_log_monitor_enabled` (Boolean) Whether audit log monitor is enabled. Note an advanced license is required. - `customer_role_arn` (String) The AWS customer role arn for Wiz to assume. - `events_cloudtrail_bucket_name` (String) If using Wiz Cloud Events, the CloudTrail bucket name. - `events_cloudtrail_bucket_sub_account` (String) If using Wiz Cloud Events and CloudTrail is organizational, the CloudTrail bucket sub account. - `events_cloudtrail_organization` (String) If using Wiz Cloud Events and CloudTrail is deployed to AWS organizations, the organizational ID. - `excluded_accounts` (List of String) The AWS accounts excluded from the connector. - `excluded_ous` (List of String) The AWS OUs excluded from the connector. - `external_id_nonce` (String) The AWS external ID / nonce, this will be used for IAM-related dependencies (`sts:ExternalId` conditional trust policies). - `id` (String) Wiz internal identifier for the connector. - `opted_in_regions` (List of String) The AWS regions opted in for the connector. - `region` (String) The AWS region for the connector. - `skip_organization_scan` (Boolean) Whether to skip the organization scan (account-scoped only). ## Import Import is supported using the following syntax: ```shell # Importing Considerations: # # Please note this is considered experimental, exercise caution and consider the following: # # - Make sure that the `auth_params` field is set to the same values as set when the resource was created outside of Terraform. # This is due to the way we need to handle change as under normal diff conditions, `auth_params` requires a resource recreation. # # - For `auth_params` include `customerRoleArn`. If using outposts, also include `outPostId` and `diskAnalyzer` structure. # # For more information, refer to the examples in the documentation. # terraform import wiz_connector_aws.import_example "7be792ba-bfd1-46d0-9fba-5f6bc19df4a8" # Optional - this is to set auth_params in state. # # If not run post-import, the next `terraform apply` will take care of it. # Note any speculative changes to `auth_params` are for setting state for the one-time import only, any further changes would require a resource recreation as normal. terraform apply --target=wiz_connector_aws.import_example ```