The following example illustrates a Terraform file containing the
provider and module definitions. In this example, account_admin_arn refers to
the programmatic access role that was created in step 1. The field
account_ids represents the list of AWS accounts that
need to be onboarded. The field
cft_role_name represents
the role that was created in step 2 in each of the onboarded
accounts.
terraform {
required_providers {
cloudngfwaws = {
source = "paloaltonetworks/cloudngfwaws"
}
}
}
provider "cloudngfwaws" {
account_admin_arn = "arn:aws:iam::11222333344:role/fwaas_prog_onboard"
json_config_file = "./.cloudngfwaws_creds.json"
}
module "account_onboarding1" {
source = “github.com/PaloAltoNetworks/terraform-provider-cloudngfwaws/modules/account_onboarding"
account_ids = ["ACCOUNT_1", "ACCOUNT_2"...., “ACCOUNT_100”]
cft_role_name = "cft_apply_role"
}
module "account_onboarding2" {
source = “github.com/PaloAltoNetworks/terraform-provider-cloudngfwaws/modules/account_onboarding"
account_ids = ["ACCOUNT_101", "ACCOUNT_102"...., “ACCOUNT_200”]
cft_role_name = "cft_apply_role"
}