Managing AWS Cloud Accounts with Terraform
Manage AWS Cloud Accounts as code in Terraform
Overview
How to define your AWS Cloud Account in Terraform
Prerequisites
Step 1: Define variables
variable "panther_api_token" {
description = "Panther API token"
type = string
sensitive = true
}
variable "panther_api_url" {
description = "Panther API URL"
type = string
}
variable "integration_label" {
description = "Display name for the AWS Cloud Account integration."
type = string
}
variable "aws_account_id" {
description = "The 12-digit AWS account ID."
type = string
}
variable "audit_role" {
description = "The IAM role ARN that Panther assumes to scan the AWS account."
type = string
}
// (Optional) Regions, resource types, and ARN regex patterns to exclude from scanning.
variable "region_ignore_list" {
description = "AWS regions to exclude from scanning."
type = list(string)
default = []
}
variable "resource_type_ignore_list" {
description = "Resource types to exclude from scanning (for example, AWS.S3.Bucket)."
type = list(string)
default = []
}
variable "resource_regex_ignore_list" {
description = "Regex patterns matching resource ARNs to exclude from scanning."
type = list(string)
default = []
}Step 2: Provide values for the defined variables
Step 3: Define the Terraform provider
Step 4: Define the Panther AWS Cloud Account resource
Resource reference
panther_aws_cloud_account
panther_aws_cloud_accountArguments
Name
Type
Required
Description
aws_scan_config
aws_scan_configName
Type
Required
Description
Attributes
Name
Type
Description
Importing existing AWS Cloud Accounts
Last updated
Was this helpful?

