### Guided Deployment of Zscaler App Connector ASG Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base_ac_asg/README.md Instructions for deploying the Zscaler App Connector Autoscaling Group using the `zsac` helper script, including interactive prompts for environment setup. ```Bash ./zsac up # User enters "greenfield" # User enters "base_ac_asg" # Follow remaining authentication and configuration prompts. ``` -------------------------------- ### Install Semantic-Release and Release Dependencies Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/docs/contributing.md Installs `semantic-release` and its required plugins globally using npm. This is a prerequisite for testing and publishing new releases, ensuring all necessary tools are available. ```Shell $ npm install -g semantic-release@^17.1.1 @semantic-release/git@^9.0.0 @semantic-release/exec@^5.0.0 conventional-changelog-conventionalcommits@^4.4.0 ``` -------------------------------- ### Guided Deployment of Zscaler App Connector (Bash) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/ac/README.md Instructions for deploying the Zscaler App Connector using the interactive `zsac` bash script. This method guides the user through required inputs, handles authentication, and automatically executes Terraform init/apply. ```bash ./zsac up ``` -------------------------------- ### Deploy Zscaler "base_ac" Environment (Guided) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base_ac/README.md Instructions for deploying the Zscaler "base_ac" environment using the guided `zsac` bash script. This script automates the Terraform operations, handles authentication, and validates inputs. ```Bash ./zsac up - enter "greenfield" - enter "base_ac" - follow the remainder of the authentication and configuration input prompts. - script will detect client operating system and download/run a specific version of terraform in a temporary bin directory - inputs will be validated and terraform init/apply will automatically exectute. - verify all resources that will be created/modified and enter "yes" to confirm ``` -------------------------------- ### Execute Brownfield ZPA App Connector Deployment (Bash) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/README.md Provides step-by-step instructions for performing a brownfield deployment of ZPA App Connectors. This approach is suitable for production environments, offering more customization options and not including a bastion host. It involves navigating to the examples directory, optionally editing `terraform.tfvars`, running the `zsac up` script, selecting 'brownfield' and a deployment type, and confirming resource creation. ```bash cd examples Optional: Edit the terraform.tfvars file under your desired deployment type (ie: ac) to setup your App Connector (Details are documented inside the file) - ./zsac up - enter "brownfield" - enter - follow prompts for any additional configuration inputs. *keep in mind, any modifications done to terraform.tfvars first will override any inputs from the zsac script* - script will detect client operating system and download/run a specific version of terraform in a temporary bin directory - inputs will be validated and terraform init/apply will automatically exectute. - verify all resources that will be created/modified and enter "yes" to confirm ``` -------------------------------- ### Deploy Zscaler App Connector ASG (Guided) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/ac_asg/README.md Instructions for deploying the Zscaler App Connector Autoscaling Group using the guided `zsac` bash script, including prompts for deployment type and configuration. ```Bash ./zsac up ``` -------------------------------- ### Execute Greenfield ZPA App Connector Deployment (Bash) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/README.md Provides step-by-step instructions for performing a greenfield deployment of ZPA App Connectors. This process is suitable for building an entire cluster from scratch, ideal for demos, PoCs, or dev-test environments. It involves navigating to the examples directory, optionally editing `terraform.tfvars`, running the `zsac up` script, selecting 'greenfield' and a deployment type, and confirming resource creation. ```bash cd examples Optional: Edit the terraform.tfvars file under your desired deployment type (ie: base_ac) to setup your App Connector Group (Details are documented inside the file) - ./zsac up - enter "greenfield" - enter - follow prompts for any additional configuration inputs. *keep in mind, any modifications done to terraform.tfvars first will override any inputs from the zsac script* - script will detect client operating system and download/run a specific version of terraform in a temporary bin directory - inputs will be validated and terraform init/apply will automatically exectute. - verify all resources that will be created/modified and enter "yes" to confirm ``` -------------------------------- ### Deploy Zscaler Base Type (Guided) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base/README.md This snippet shows how to deploy the Zscaler 'Base' deployment type using the guided `zsac` bash script. It automates the process by walking through required inputs, validating them, and executing Terraform init/apply. ```bash ./zsac up - enter "greenfield" - enter "base" - follow the remainder of the authentication and configuration input prompts. - script will detect client operating system and download/run a specific version of terraform in a temporary bin directory - inputs will be validated and terraform init/apply will automatically exectute. - verify all resources that will be created/modified and enter "yes" to confirm ``` -------------------------------- ### Guided Destruction of Zscaler App Connector ASG Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base_ac_asg/README.md Instructions for destroying the Zscaler App Connector Autoscaling Group using the `zsac` helper script from the examples directory. ```Bash ./zsac destroy ``` -------------------------------- ### Terraform Module Dependencies and Resources Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/modules/terraform-zsac-asg-aws/README.md This section outlines the version requirements for Terraform and the AWS provider, along with the specific AWS resources that this module provisions and manages. It details the necessary environment setup and the core components deployed for Zscaler App Connector appliances. ```APIDOC Requirements: terraform: >= 0.13.7, < 2.0.0 aws: ~> 5.94.0 Providers: aws: ~> 5.94.0 Resources: aws_autoscaling_group.ac_asg: resource aws_autoscaling_policy.ac_asg_target_tracking_policy: resource aws_launch_template.ac_launch_template: resource ``` -------------------------------- ### Terraform Output: testbedconfig Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/ac_asg/README.md Provides the results and configuration details related to the AWS Testbed setup. This output is useful for verifying the deployment and for further automation. ```APIDOC Output: testbedconfig Description: AWS Testbed results ``` -------------------------------- ### Destroy ZPA App Connector Cluster (Bash) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/README.md Provides instructions for destroying a deployed ZPA App Connector cluster. This involves navigating to the examples directory, running the `zsac destroy` script, and confirming the destruction of all associated resources. ```bash cd examples - ./zsac destroy - verify all resources that will be destroyed and enter "yes" to confirm ``` -------------------------------- ### Guided Destruction of Zscaler App Connector (Bash) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/ac/README.md Instructions for destroying the Zscaler App Connector resources using the interactive `zsac` bash script. This method simplifies the cleanup process. ```bash ./zsac destroy ``` -------------------------------- ### Destroy Zscaler "base_ac" Environment (Guided) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base_ac/README.md Instructions for destroying the Zscaler "base_ac" environment using the guided `zsac` bash script. This script automates the Terraform destroy process. ```Bash ./zsac destroy ``` -------------------------------- ### Destroy Zscaler App Connector ASG (Guided) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/ac_asg/README.md Instructions for destroying the Zscaler App Connector Autoscaling Group using the guided `zsac` bash script. ```Bash ./zsac destroy ``` -------------------------------- ### Terraform AWS ZPA App Connector Bastion Host Module API Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/modules/terraform-zsac-bastion-aws/README.md Comprehensive API documentation for the Terraform module, detailing its requirements, providers, resources, input variables, and output values for deploying an AWS EC2 bastion host. ```APIDOC Requirements: terraform: >= 0.13.7, < 2.0.0 aws: ~> 5.94.0 ``` ```APIDOC Providers: aws: ~> 5.94.0 ``` ```APIDOC Resources: aws_iam_instance_profile.bastion_host_profile: resource aws_iam_role.bastion_iam_role: resource aws_iam_role_policy_attachment.ssm_managed_instance_core: resource aws_instance.bastion: resource aws_security_group.bastion: resource aws_security_group_rule.internet: resource aws_security_group_rule.intranet: resource aws_security_group_rule.ssh: resource aws_iam_policy_document.bastion_instance_assume_role_policy: data source aws_ssm_parameter.amazon_linux_latest: data source aws_vpc.selected: data source ``` ```APIDOC Inputs: bastion_nsg_source_prefix: Description: CIDR blocks of trusted networks for bastion host ssh access Type: list(string) Default: ["0.0.0.0/0"] Required: no disk_size: Description: The size of the root volume in gigabytes. Type: number Default: 10 Required: no global_tags: Description: Populate any custom user defined tags from a map Type: map(string) Default: {} Required: no iam_role_policy_ssmcore: Description: AWS EC2 Instance predefined IAM Role to access AWS SSM Type: string Default: "AmazonSSMManagedInstanceCore" Required: no instance_key: Description: SSH Key for instances Type: string Default: n/a Required: yes instance_type: Description: The bastion host EC2 instance type Type: string Default: "t3.micro" Required: no name_prefix: Description: A prefix to associate to all the Workload module resources Type: string Default: null Required: no public_subnet: Description: The public subnet where the bastion host has to be attached Type: string Default: n/a Required: yes resource_tag: Description: A tag to associate to all the Workload module resources Type: string Default: null Required: no vpc_id: Description: App Connector VPC ID Type: string Default: n/a Required: yes ``` ```APIDOC Outputs: public_dns: Description: Instance Public DNS public_ip: Description: Instance Public IP ``` -------------------------------- ### Deploy Zscaler "base_ac" Environment (Manual) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base_ac/README.md Manual steps to initialize and apply the Terraform configuration for the Zscaler "base_ac" environment. This option requires modifying the `terraform.tfvars` file directly before execution. ```Bash terraform init terraform apply ``` -------------------------------- ### Destroy Zscaler Base Type (Guided) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base/README.md This snippet shows how to destroy the Zscaler 'Base' deployment type using the guided `zsac` bash script. This method simplifies the cleanup process by automating the Terraform destroy command. ```bash ./zsac destroy ``` -------------------------------- ### Terraform Module API Documentation for Zscaler App Connector IAM Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/modules/terraform-zsac-iam-aws/README.md Comprehensive API documentation for the Zscaler App Connector AWS IAM Terraform module, detailing its requirements, providers, managed resources, configurable inputs, and available outputs. ```APIDOC Requirements: terraform: >= 0.13.7, < 2.0.0 aws: ~> 5.94.0 Providers: aws: ~> 5.94.0 Resources: aws_iam_instance_profile.ac_host_profile: resource aws_iam_role.ac_node_iam_role: resource aws_iam_instance_profile.ac_host_profile_selected: data source aws_iam_policy_document.instance_assume_role_policy: data source Inputs: byo_iam: Description: Bring your own IAM Instance Profile for App Connector. Setting this variable to true will effectively instruct this module to not create any resources and only reference data resources from values provided in byo_iam_instance_profile_id Type: bool Default: false Required: no byo_iam_instance_profile_id: Description: Existing IAM Instance Profile IDs for App Connector association Type: list(string) Default: null Required: no global_tags: Description: Populate any custom user defined tags from a map Type: map(string) Default: {} Required: no iam_count: Description: Default number IAM roles/policies/profiles to create Type: number Default: 1 Required: no name_prefix: Description: A prefix to associate to all the App Connector IAM module resources Type: string Default: null Required: no resource_tag: Description: A tag to associate to all the App Connector IAM module resources Type: string Default: null Required: no Outputs: iam_instance_profile_arn: Description: App Connector IAM Instance Profile ARN iam_instance_profile_id: Description: App Connector IAM Instance Profile ``` -------------------------------- ### ZPA App Connector Deployment Configuration Notes (Bash) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/README.md Provides important notes and configuration options for automating or customizing ZPA App Connector deployments. This includes setting the `AUTO_APPROVE` environment variable for automatic confirmation, setting the `dtype` environment variable for specifying the deployment type, and deleting the `.zsacrc` file to re-configure credentials or region. ```bash 1. For auto approval set environment variable **AUTO_APPROVE** or add `export AUTO_APPROVE=1` 2. For deployment type set environment variable **dtype** to the required deployment type or add `export dtype=base_ac` 3. To provide new credentials or region, delete the autogenerated .zsacrc file in your current working directory and re-run zsac. ``` -------------------------------- ### Manual Deployment of Zscaler App Connector (Terraform) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/ac/README.md Steps for manually deploying the Zscaler App Connector using standard Terraform commands after modifying the `terraform.tfvars` file with desired input values. ```terraform terraform init terraform apply ``` -------------------------------- ### Manual Deployment of Zscaler App Connector ASG Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base_ac_asg/README.md Steps to manually initialize and apply the Terraform configuration for the Zscaler App Connector Autoscaling Group from the `base_ac_asg` directory. ```Terraform terraform init terraform apply ``` -------------------------------- ### Terraform AWS ZPA App Connector Module Input Variables Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/ac_asg/README.md Details for all input variables available in the `terraform-aws-zpa-app-connector-modules` module. Each variable specifies its name, a brief description, its data type, default value (if any), and whether it is a required parameter for the module. ```APIDOC Input Variables: - Name: az_count Description: Default number of subnets to create based on availability zone input Type: number Default: 2 Required: false - Name: byo_iam Description: Bring your own IAM Instance Profile for App Connector Type: bool Default: false Required: false - Name: byo_iam_instance_profile_id Description: IAM Instance Profile ID for App Connector association Type: list(string) Default: null Required: false - Name: byo_igw Description: Bring your own AWS VPC for App Connector Type: bool Default: false Required: false - Name: byo_igw_id Description: User provided existing AWS Internet Gateway ID Type: string Default: null Required: false - Name: byo_ngw Description: Bring your own AWS NAT Gateway(s) App Connector Type: bool Default: false Required: false - Name: byo_ngw_ids Description: User provided existing AWS NAT Gateway IDs Type: list(string) Default: null Required: false - Name: byo_provisioning_key Description: Bring your own App Connector Provisioning Key. Setting this variable to true will effectively instruct this module to not create any resources and only reference data resources from values provided in byo_provisioning_key_name Type: bool Default: false Required: false - Name: byo_provisioning_key_name Description: Existing App Connector Provisioning Key name Type: string Default: null Required: false - Name: byo_security_group Description: Bring your own Security Group for App Connector Type: bool Default: false Required: false - Name: byo_security_group_id Description: Management Security Group ID for App Connector association Type: list(string) Default: null Required: false - Name: byo_subnet_ids Description: User provided existing AWS Subnet IDs Type: list(string) Default: null Required: false - Name: byo_subnets Description: Bring your own AWS Subnets for App Connector Type: bool Default: false Required: false - Name: byo_vpc Description: Bring your own AWS VPC for App Connector Type: bool Default: false Required: false - Name: byo_vpc_id Description: User provided existing AWS VPC ID Type: string Default: null Required: false - Name: enrollment_cert Description: Get name of ZPA enrollment cert to be used for App Connector provisioning Type: string Default: "Connector" Required: false - Name: health_check_grace_period Description: The amount of time until EC2 Auto Scaling performs the first health check on new instances after they are put into service. Default is 5 minutes Type: number Default: 300 Required: false - Name: launch_template_version Description: Launch template version. Can be version number, $Latest or $Default Type: string Default: "$Latest" Required: false - Name: max_size Description: Maxinum number of App Connectors to maintain in Autoscaling group Type: number Default: 4 Required: false - Name: min_size Description: Mininum number of App Connectors to maintain in Autoscaling group Type: number Default: 2 Required: false - Name: name_prefix Description: The name prefix for all your resources Type: string Default: "zsdemo" Required: false - Name: owner_tag Description: populate custom owner tag attribute Type: string Default: "zsac-admin" Required: false - Name: provisioning_key_association_type Description: Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP Type: string Default: "CONNECTOR_GRP" Required: false - Name: provisioning_key_enabled Description: Whether the provisioning key is enabled or not. Default: true Type: bool Default: true Required: false - Name: provisioning_key_max_usage Description: The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge Type: number Default: 10 Required: false - Name: public_subnets Description: Public/NAT GW Subnets to create in VPC. This is only required if you want to override the default subnets that this code creates via vpc_cidr variable. Type: list(string) Default: null Required: false ``` -------------------------------- ### Terraform Module Dependencies Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/ac_asg/README.md Lists the internal modules leveraged by this deployment, including their source paths. ```APIDOC Modules: ac_asg: ../../modules/terraform-zsac-asg-aws ac_iam: ../../modules/terraform-zsac-iam-aws ac_sg: ../../modules/terraform-zsac-sg-aws network: ../../modules/terraform-zsac-network-aws zpa_app_connector_group: ../../modules/terraform-zpa-app-connector-group zpa_provisioning_key: ../../modules/terraform-zpa-provisioning-key ``` -------------------------------- ### Deploy Zscaler App Connector ASG (Manual) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/ac_asg/README.md Instructions for manually deploying the Zscaler App Connector Autoscaling Group using Terraform commands after modifying the `terraform.tfvars` file. ```Terraform terraform init terraform apply ``` -------------------------------- ### Terraform ZPA App Connector Group Module Inputs Reference Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/modules/terraform-zpa-app-connector-group/README.md This reference details the configurable input variables for the Zscaler ZPA App Connector Group Terraform module. It includes parameters for geographical location, naming, operational status, DNS resolution settings, and software upgrade preferences, indicating their types, default values, and whether they are required. ```APIDOC Inputs: app_connector_group_country_code: Description: "Optional: Country code of this App Connector Group. example 'US'" Type: "string" Default: """ Required: "no" app_connector_group_description: Description: "Optional: Description of the App Connector Group" Type: "string" Default: """ Required: "no" app_connector_group_dns_query_type: Description: "Whether to enable IPv4 or IPv6, or both, for DNS resolution of all applications in the App Connector Group" Type: "string" Default: ""IPV4_IPV6"" Required: "no" app_connector_group_enabled: Description: "Whether this App Connector Group is enabled or not" Type: "bool" Default: "true" Required: "no" app_connector_group_latitude: Description: "Latitude of the App Connector Group. Integer or decimal. With values in the range of -90 to 90" Type: "string" Default: "n/a" Required: "yes" app_connector_group_location: Description: "location of the App Connector Group in City, State, Country format. example: 'San Jose, CA, USA'" Type: "string" Default: "n/a" Required: "yes" app_connector_group_longitude: Description: "Longitude of the App Connector Group. Integer or decimal. With values in the range of -90 to 90" Type: "string" Default: "n/a" Required: "yes" app_connector_group_name: Description: "Name of the App Connector Group" Type: "string" Default: "n/a" Required: "yes" app_connector_group_override_version_profile: Description: "Optional: Whether the default version profile of the App Connector Group is applied or overridden. Default: false" Type: "bool" Default: "true" Required: "no" app_connector_group_upgrade_day: Description: "Optional: App Connectors in this group will attempt to update to a newer version of the software during this specified day. Default value: SUNDAY. List of valid days (i.e., SUNDAY, MONDAY, etc)" Type: "string" Default: ""SUNDAY"" Required: "no" app_connector_group_upgrade_time_in_secs: Description: "Optional: App Connectors in this group will attempt to update to a newer version of the software during this specified time. Default value: 66600. Integer in seconds (i.e., 66600). The integer should be greater than or equal to 0 and less than 86400, in 15 minute intervals" Type: "string" Default: ""66600"" Required: "no" app_connector_group_version_profile_id: Description: "Optional: ID of the version profile. To learn more, see Version Profile Use Cases. https://help.zscaler.com/zpa/configuring-version-profile" Type: "string" Default: ""2"" Required: "no" ``` -------------------------------- ### Merge Develop Branch into Master and Push Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/docs/contributing.md Switches to the `master` branch, merges the `develop` branch into it, and pushes the changes to the remote `origin`. This critical step triggers GitHub Actions for building and tagging the release, initiating the official release process. ```Shell git checkout master git merge develop git push origin master ``` -------------------------------- ### Terraform AWS ZPA App Connector Module Resources and Data Sources Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/ac/README.md This section enumerates the Terraform resources and data sources used in the Zscaler ZPA App Connector AWS module, detailing their names and types. It serves as a quick reference to the infrastructure components managed by this module. ```APIDOC Resources: aws_key_pair.deployer: resource local_file.private_key: resource local_file.rhel9_user_data_file: resource local_file.testbed: resource local_file.user_data_file: resource random_string.suffix: resource tls_private_key.key: resource Data Sources: aws_ami.appconnector: data source aws_ami.rhel_9_latest: data source ``` -------------------------------- ### Terraform AWS ZPA App Connector Module Input Variables Reference Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base_ac_asg/README.md Detailed reference for all configurable input variables available in the Terraform AWS ZPA App Connector module. Each variable includes its purpose, data type, default value, and whether it is required. ```APIDOC - name: bastion_nsg_source_prefix description: CIDR blocks of trusted networks for bastion host ssh access type: list(string) default: ["0.0.0.0/0"] required: false - name: byo_provisioning_key description: Bring your own App Connector Provisioning Key. Setting this variable to true will effectively instruct this module to not create any resources and only reference data resources from values provided in byo_provisioning_key_name type: bool default: false required: false - name: byo_provisioning_key_name description: Existing App Connector Provisioning Key name type: string default: null required: false - name: enrollment_cert description: Get name of ZPA enrollment cert to be used for App Connector provisioning type: string default: "Connector" required: false - name: health_check_grace_period description: The amount of time until EC2 Auto Scaling performs the first health check on new instances after they are put into service. Default is 5 minutes type: number default: 300 required: false - name: launch_template_version description: Launch template version. Can be version number, "$Latest" or "$Default" type: string default: "$Latest" required: false - name: max_size description: Maxinum number of App Connectors to maintain in Autoscaling group type: number default: 4 required: false - name: min_size description: Mininum number of App Connectors to maintain in Autoscaling group type: number default: 2 required: false - name: name_prefix description: The name prefix for all your resources type: string default: "zsdemo" required: false - name: owner_tag description: populate custom owner tag attribute type: string default: "zsac-admin" required: false - name: provisioning_key_association_type description: Specifies the provisioning key type for App Connectors or ZPA Private Service Edges. The supported values are CONNECTOR_GRP and SERVICE_EDGE_GRP type: string default: "CONNECTOR_GRP" required: false - name: provisioning_key_enabled description: Whether the provisioning key is enabled or not. Default: true type: bool default: true required: false - name: provisioning_key_max_usage description: The maximum number of instances where this provisioning key can be used for enrolling an App Connector or Service Edge type: number default: 10 required: false - name: public_subnets description: Public/NAT GW Subnets to create in VPC. This is only required if you want to override the default subnets that this code creates via vpc_cidr variable. type: list(string) default: null required: false - name: reuse_on_scale_in description: Specifies whether instances in the Auto Scaling group can be returned to the warm pool on scale in. type: bool default: false required: false - name: target_cpu_util_value description: Target value number for autoscaling policy CPU utilization target tracking. ie: trigger a scale in/out to keep average CPU Utliization percentage across all instances at/under this number type: number default: 50 required: false - name: target_tracking_metric description: The AWS ASG pre-defined target tracking metric type. App Connector recommends ASGAverageCPUUtilization type: string default: "ASGAverageCPUUtilization" required: false - name: tls_key_algorithm description: algorithm for tls_private_key resource type: string default: "RSA" required: false - name: use_zscaler_ami description: By default, App Connector will deploy via the Zscaler Latest AMI. Setting this to false will deploy the latest Amazon Linux 2 AMI instead type: bool default: true required: false - name: vpc_cidr description: VPC IP CIDR Range. All subnet resources that might get created (public / app connector) are derived from this /16 CIDR. If you require creating a VPC smaller than /16, you may need to explicitly define all other subnets via public_subnets and ac_subnets variables type: string default: "10.1.0.0/16" required: false ``` -------------------------------- ### Terraform Module Outputs Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/modules/terraform-zpa-provisioning-key/README.md Describes the output values provided by the ZPA App Connector Provisioning Key module, specifically the ZPA Provisioning Key object, which can be referenced by other modules. ```APIDOC Outputs: provisioning_key: Description: ZPA Provisioning Key Output ``` -------------------------------- ### Terraform Modules Used Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base_ac/README.md Lists the Terraform modules included in the "base_ac" deployment, specifying their names, relative source paths, and versions (if applicable). ```APIDOC Name | Source | Version ---|--------|--------- ac_iam | ../../modules/terraform-zsac-iam-aws | n/a ac_sg | ../../modules/terraform-zsac-sg-aws | n/a ac_vm | ../../modules/terraform-zsac-acvm-aws | n/a bastion | ../../modules/terraform-zsac-bastion-aws | n/a network | ../../modules/terraform-zsac-network-aws | n/a zpa_app_connector_group | ../../modules/terraform-zpa-app-connector-group | n/a zpa_provisioning_key | ../../modules/terraform-zpa-provisioning-key | n/a ``` -------------------------------- ### Terraform Module Resources and Data Sources Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/modules/terraform-zpa-provisioning-key/README.md Details the ZPA resources and data sources managed or referenced by this Terraform module for provisioning keys, including their types and registry links. ```APIDOC Resources: zpa_provisioning_key.provisioning_key: resource zpa_enrollment_cert.connector_cert: data source zpa_provisioning_key.provisioning_key_selected: data source ``` -------------------------------- ### Perform a Dry Run of Semantic-Release on Develop Branch Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/docs/contributing.md Executes `semantic-release` in dry-run mode on the `develop` branch to verify the next version and release notes without actually publishing. This helps validate the release configuration and ensures correctness before a real release. ```Shell semantic-release --dry-run --no-ci --branches=develop ``` -------------------------------- ### Greenfield ZPA App Connector Deployment Types Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/README.md Defines the available deployment types for greenfield ZPA App Connector clusters, detailing the infrastructure components created by each. These types include 'base' (VPC, subnets, IGW, NAT Gateway, Bastion Host), 'base_ac' (adds App Connector private subnets and VMs), and 'base_ac_asg' (deploys App Connectors via Autoscaling Group). ```APIDOC Deployment Type: (base | base_ac | base_ac_asg): base: Creates 1 new VPC with 1 public subnet and 1 private/workload subnet; 1 IGW; 1 NAT Gateway; 1 Bastion Host in the public subnet assigned an Elastic IP and routing to the IGW; generates local key pair .pem file for ssh access. This template alone will NOT create any App Connector appliances. base_ac: Base Deployment Type + Creates App Connector private subnets and App Connector VMs egressing through the NAT Gateways in their respective availability zones. Please refer to additional requirements in this deployment folder terraform.tfvars file prior to running to step through requirements to create a new App Connector Group if you do NOT already have one created. base_ac_asg: Base Deployment Type + Creates App Connectors via Launch Template in an Autoscaling Group. Please refer to additional requirements in this deployment folder terraform.tfvars file prior to running to step through requirements to create a new App Connector Group if you do NOT already have one created. ``` -------------------------------- ### Terraform Module Providers Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base_ac_asg/README.md Lists the specific Terraform providers and their versions utilized by the Zscaler App Connector ASG module for resource provisioning. ```APIDOC Providers: aws: ~> 5.94.0 local: ~> 2.5.0 random: ~> 3.6.0 tls: ~> 4.0.0 ``` -------------------------------- ### Terraform AWS ZPA App Connector Module Input Variables Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/ac_asg/README.md Documents the configurable input variables for the Terraform AWS ZPA App Connector module, specifying their names, descriptions, data types, default values, and whether they are required for module deployment. ```APIDOC ac_subnets: Description: App Connector Subnets to create in VPC. This is only required if you want to override the default subnets that this code creates via vpc_cidr variable. Type: list(string) Default: null Required: no acvm_instance_type: Description: App Connector Instance Type Type: string Default: "m5.large" Required: no ami_id: Description: AMI ID(s) to be used for deploying App Connector appliances. Ideally all VMs should be on the same AMI ID as templates always pull the latest from AWS Marketplace. This variable is provided if a customer desires to override/retain an old ami for existing deployments rather than upgrading and forcing a replacement. It is also inputted as a list to facilitate if a customer desired to manually upgrade select ACs deployed based on the ac_count index Type: list(string) Default: [""] Required: no app_connector_group_country_code: Description: Optional: Country code of this App Connector Group. example 'US' Type: string Default: "" Required: no app_connector_group_description: Description: Optional: Description of the App Connector Group Type: string Default: "This App Connector Group belongs to: " Required: no app_connector_group_dns_query_type: Description: Whether to enable IPv4 or IPv6, or both, for DNS resolution of all applications in the App Connector Group Type: string Default: "IPV4_IPV6" Required: no app_connector_group_enabled: Description: Whether this App Connector Group is enabled or not Type: bool Default: true Required: no app_connector_group_latitude: Description: Latitude of the App Connector Group. Integer or decimal. With values in the range of -90 to 90 Type: string Default: "37.3382082" Required: no app_connector_group_location: Description: location of the App Connector Group in City, State, Country format. example: 'San Jose, CA, USA' Type: string Default: "San Jose, CA, USA" Required: no app_connector_group_longitude: Description: Longitude of the App Connector Group. Integer or decimal. With values in the range of -90 to 90 Type: string Default: "-121.8863286" Required: no app_connector_group_override_version_profile: Description: Optional: Whether the default version profile of the App Connector Group is applied or overridden. Default: false Type: bool Default: true Required: no app_connector_group_upgrade_day: Description: Optional: App Connectors in this group will attempt to update to a newer version of the software during this specified day. Default value: SUNDAY. List of valid days (i.e., SUNDAY, MONDAY, etc) Type: string Default: "SUNDAY" Required: no app_connector_group_upgrade_time_in_secs: Description: Optional: App Connectors in this group will attempt to update to a newer version of the software during this specified time. Default value: 66600. Integer in seconds (i.e., 66600). The integer should be greater than or equal to 0 and less than 86400, in 15 minute intervals Type: string Default: "66600" Required: no app_connector_group_version_profile_id: Description: Optional: ID of the version profile. To learn more, see Version Profile Use Cases. https://help.zscaler.com/zpa/configuring-version-profile Type: string Default: "2" Required: no associate_public_ip_address: Description: enable/disable public IP addresses on App Connector instances. Setting this to true will result in the following: Dynamic Public IP address on the App Connector VM Instance will be enabled; no EIP or NAT Gateway resources will be created; and the App Connector Route Table default route next-hop will be set as the IGW Type: bool Default: false Required: no aws_region: Description: The AWS region. Type: string Default: "us-west-2" Required: no ``` -------------------------------- ### Terraform Output Variable: testbedconfig Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/ac/README.md Provides the results of the AWS Testbed configuration. ```APIDOC output "testbedconfig" { description = "AWS Testbed results" } ``` -------------------------------- ### Terraform Module Outputs Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/modules/terraform-zsac-acvm-aws/README.md Describes the output values provided by the Terraform module after deployment, such as instance ID, IP addresses, and availability zone, which can be referenced by other Terraform configurations. ```APIDOC availability_zone: Description: Instance Availability Zone id: Description: Instance ID private_ip: Description: Instance Private IP Address public_ip: Description: Instance Public IP ``` -------------------------------- ### Terraform AWS ZPA App Connector Module Output Variables Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/modules/terraform-zsac-asg-aws/README.md Describes the output values exposed by the Terraform AWS ZPA App Connector module, which can be referenced by other Terraform configurations or used for informational purposes. ```APIDOC Output Variables: availability_zone: Description: Instance Availability Zone ``` -------------------------------- ### Deploy Zscaler Base Type (Manual) Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base/README.md This snippet shows how to manually deploy the Zscaler 'Base' deployment type using standard Terraform commands. Users are required to modify and populate variable input values in the `base/terraform.tfvars` file before execution. ```terraform terraform init terraform apply ``` -------------------------------- ### Terraform Module Inputs Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/modules/terraform-zsac-acvm-aws/README.md Defines the configurable input variables for the Terraform module, including their types, default values, and whether they are required. These inputs allow customization of the App Connector EC2 instance deployment. ```APIDOC ac_count: Description: Default number of App Connector appliances to create Type: number Default: 1 Required: no ac_subnet_ids: Description: App Connector EC2 Instance subnet ID Type: list(string) Default: n/a Required: yes acvm_instance_type: Description: App Connector Instance Type Type: string Default: "m5.large" Required: no ami_id: Description: AMI ID(s) to be used for deploying App Connector appliances. Ideally all VMs should be on the same AMI ID as templates always pull the latest from AWS Marketplace. This variable is provided if a customer desires to override/retain an old ami for existing deployments rather than upgrading and forcing a replacement. It is also inputted as a list to facilitate if a customer desired to manually upgrade select ACs deployed based on the ac_count index Type: list(string) Default: [ "" ] Required: no associate_public_ip_address: Description: enable/disable public IP addresses on App Connector instances Type: bool Default: false Required: no global_tags: Description: Populate any custom user defined tags from a map Type: map(string) Default: {} Required: no iam_instance_profile: Description: IAM instance profile ID assigned to App Connector Type: list(string) Default: n/a Required: yes imdsv2_enabled: Description: true/false whether to force IMDSv2 only for instance bring up. Default is true Type: bool Default: true Required: no instance_key: Description: SSH Key for instances Type: string Default: n/a Required: yes name_prefix: Description: A prefix to associate to all the App Connector module resources Type: string Default: null Required: no resource_tag: Description: A tag to associate to all the App Connector module resources Type: string Default: null Required: no security_group_id: Description: App Connector EC2 Instance management subnet id Type: list(string) Default: n/a Required: yes user_data: Description: App Init data Type: string Default: n/a Required: yes ``` -------------------------------- ### Terraform AWS ZPA App Connector Module Input Variables Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/modules/terraform-zsac-asg-aws/README.md This section details all configurable input variables for the Zscaler Private Access (ZPA) App Connector Terraform module for AWS. These variables allow users to customize the deployment of App Connector instances, including network settings, instance types, storage, and auto-scaling parameters. ```APIDOC Input: ac_subnet_ids Description: App Connector EC2 Instance subnet IDs list Type: list(string) Default: n/a Required: yes Input: acvm_instance_type Description: App Connector Instance Type Type: string Default: "m5.large" Required: no Input: ami_id Description: AMI ID(s) to be used for deploying App Connector appliances. Ideally all VMs should be on the same AMI ID as templates always pull the latest from AWS Marketplace. This variable is provided if a customer desires to override/retain an old ami for existing deployments rather than upgrading and forcing a replacement. It is also inputted as a list to facilitate if a customer desired to manually upgrade select ACs deployed based on the ac_count index Type: list(string) Default: [ "" ] Required: no Input: associate_public_ip_address Description: enable/disable public IP addresses on App Connector instances Type: bool Default: false Required: no Input: ebs_block_device_name Description: EBS block device name Type: string Default: "/dev/xvda" Required: no Input: ebs_encrypted Description: Whether to encrypt the EBS volume Type: bool Default: true Required: no Input: ebs_volume_size Description: EBS volume size Type: number Default: 16 Required: no Input: ebs_volume_type Description: EBS volume type Type: string Default: "gp3" Required: no Input: global_tags Description: Populate any custom user defined tags from a map Type: map(string) Default: {} Required: no Input: health_check_grace_period Description: The amount of time until EC2 Auto Scaling performs the first health check on new instances after they are put into service. Default is 5 minutes Type: number Default: 300 Required: no Input: iam_instance_profile Description: IAM instance profile ID assigned to App Connector Type: list(string) Default: n/a Required: yes Input: instance_key Description: SSH Key for instances Type: string Default: n/a Required: yes Input: launch_template_version Description: Launch template version. Can be version number, $Latest or $Default Type: string Default: "$Latest" Required: no Input: max_size Description: Maxinum number of App Connectors to maintain in Autoscaling group Type: number Default: 4 Required: no Input: metadata_options Description: Metadata options for the instance Type: map(string) Default: { "http_endpoint": "enabled", "http_put_response_hop_limit": 2, "http_tokens": "required" } Required: no Input: min_size Description: Mininum number of App Connectors to maintain in Autoscaling group Type: number Default: 2 Required: no Input: name_prefix Description: A prefix to associate to all the App Connector module resources Type: string Default: null Required: no Input: resource_tag Description: A tag to associate to all the App Connector module resources Type: string Default: null Required: no Input: reuse_on_scale_in Description: Specifies whether instances in the Auto Scaling group can be returned to the warm pool on scale in. Type: bool Default: "false" Required: no Input: security_group_id Description: App Connector EC2 Instance management subnet id Type: list(string) Default: n/a Required: yes Input: target_cpu_util_value Description: Target value number for autoscaling policy CPU utilization target tracking. ie: trigger a scale in/out to keep average CPU Utliization percentage across all instances at/under this number Type: number Default: 50 Required: no Input: target_tracking_metric Description: The AWS ASG pre-defined target tracking metric type. App Connector recommends ASGAverageCPUUtilization Type: string Default: "ASGAverageCPUUtilization" Required: no Input: user_data Description: App Init data Type: string Default: n/a Required: yes ``` -------------------------------- ### Terraform ZPA App Connector Group Module Outputs Reference Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/modules/terraform-zpa-app-connector-group/README.md This section lists the output variables provided by the Zscaler ZPA App Connector Group Terraform module. It primarily exposes the unique identifier of the newly created App Connector Group for use in other configurations. ```APIDOC Outputs: app_connector_group_id: Description: "ZPA App Connector Group ID" ``` -------------------------------- ### Terraform Configuration Requirements Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/examples/base_ac/README.md Lists the required Terraform versions and provider versions that must be met for the "base_ac" deployment type to function correctly. ```APIDOC Name | Version ---|--------- terraform | >= 0.13.7, < 2.0.0 aws | ~> 5.94.0 local | ~> 2.5.0 null | ~> 3.2.0 random | ~> 3.6.0 tls | ~> 4.0.0 zpa | ~> 4.0.0 ``` -------------------------------- ### Synchronize Develop Branch with Master After Release Source: https://github.com/zscaler/terraform-aws-zpa-app-connector-modules/blob/master/docs/contributing.md Fetches all remote branches and tags, pulls changes from `origin/master`, switches to the `develop` branch, merges `master` into `develop`, and pushes the updated `develop` branch. This ensures `develop` includes any commits made by the release bot, keeping branches synchronized. ```Shell git fetch --all --tags git pull origin master git checkout develop git merge master git push origin develop ```