### Configure Network Access Policy Set with Authentication and Authorization Rules Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/guides/getting_started.md This HCL snippet configures a network access policy set named 'PolicySet1' based on device location. It also updates the default authentication rule to use 'Internal Endpoints' and defines a default authorization rule to permit access and assign devices to the 'New_York_Devices' security group, leveraging implicit dependencies for correct sequencing. ```hcl resource "ise_network_access_policy_set" "policy_set_1" { name = "PolicySet1" description = "My first policy set" rank = 0 service_name = "Default Network Access" condition_type = "ConditionAttributes" condition_attribute_name = "Location" condition_attribute_value = "All Locations#New York" condition_dictionary_name = "DEVICE" condition_operator = "equals" } resource "ise_network_access_authentication_rule" "authn_rule_default" { policy_set_id = ise_network_access_policy_set.policy_set_1.id name = "Default" default = true rank = 0 identity_source_name = "Internal Endpoints" if_auth_fail = "REJECT" if_process_fail = "DROP" if_user_not_found = "REJECT" } resource "ise_network_access_authorization_rule" "authz_rule_default" { policy_set_id = ise_network_access_policy_set.policy_set_1.id name = "Default" default = true rank = 0 profiles = ["PermitAccess"] security_group = ise_trustsec_security_group.sgt_new_york_devices.name } ``` -------------------------------- ### Configure Terraform Provider for Cisco ISE Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/guides/getting_started.md This HCL snippet configures the Terraform provider for Cisco ISE, specifying the required provider source and authentication details (username, password, and ISE URL) to establish a connection for managing ISE resources. ```hcl terraform { required_providers { ise = { source = "CiscoDevNet/ise" } } } provider "ise" { username = "admin" password = "password" url = "https://10.1.1.1" } ``` -------------------------------- ### Build Terraform Provider Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/CONTRIBUTING.md Instructions to build the Terraform provider from source. This involves cloning the repository, entering its directory, and executing the Go install command. ```shell go install ``` -------------------------------- ### Define Network Device Group and Security Group in Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/guides/getting_started.md This HCL snippet defines two foundational resources: a network device group named 'New York' under 'Location' and a TrustSec security group named 'New_York_Devices'. These are used to organize network devices and apply security policies within Cisco ISE. ```hcl resource "ise_network_device_group" "new_york" { name = "Location#All Locations#New York" root_group = "Location" } resource "ise_trustsec_security_group" "sgt_new_york_devices" { name = "New_York_Devices" description = "Security Group for New York Devices" value = 1300 } ``` -------------------------------- ### Example Usage for Active Directory Join Domain with All Nodes Terraform Resource Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/active_directory_join_domain_with_all_nodes.md This example demonstrates how to configure the `ise_active_directory_join_domain_with_all_nodes` resource. It shows how to specify the `join_point_id` and provide `additional_data` such as a username for the domain join operation. ```terraform resource "ise_active_directory_join_domain_with_all_nodes" "example" { join_point_id = "73808580-b6e6-11ee-8960-de6d7692bc40" additional_data = [ { name = "username" value = "administrator" } ] } ``` -------------------------------- ### Create an Internal User with Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/internal_user.md Demonstrates how to define and configure an `ise_internal_user` resource in Terraform, setting various user attributes like name, password, email, and enabling password changes. This example shows a comprehensive setup for a new internal user. ```terraform resource "ise_internal_user" "example" { name = "UserTF" password = "Cisco123" change_password = true email = "aaa@cisco.com" account_name_alias = "User 1" enable_password = "Cisco123" enabled = true password_never_expires = false first_name = "John" last_name = "Doe" password_id_store = "Internal Users" description = "My first Terraform user" } ``` -------------------------------- ### Create an ISE Repository Resource Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/repository.md This example demonstrates how to define and configure an `ise_repository` resource in Terraform, specifying its name, protocol, path, server details, and authentication credentials. ```terraform resource "ise_repository" "example" { name = "repo1" protocol = "SFTP" path = "/dir" server_name = "server1" user_name = "user9" password = "cisco123" enable_pki = false } ``` -------------------------------- ### Example Usage for ise_active_directory_add_groups Resource Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/active_directory_add_groups.md Demonstrates how to configure and manage an Active Directory Add Groups resource in Terraform, including specifying join point, domain, and group details. ```terraform resource "ise_active_directory_add_groups" "example" { join_point_id = "73808580-b6e6-11ee-8960-de6d7692bc40" name = "cisco.local" description = "My AD join point" domain = "cisco.local" ad_scopes_names = "Default_Scope" enable_domain_allowed_list = true groups = [ { name = "cisco.local/operators" sid = "S-1-5-32-548" type = "GLOBAL" } ] } ``` -------------------------------- ### Import an Existing ise_downloadable_acl Resource Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/downloadable_acl.md This example shows the command-line syntax for importing an existing `ise_downloadable_acl` resource into your Terraform state using its unique identifier. ```shell terraform import ise_downloadable_acl.example "76d24097-41c4-4558-a4d0-a8c07ac08470" ``` -------------------------------- ### Configure an ISE Certificate Authentication Profile Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/certificate_authentication_profile.md This example demonstrates how to define and configure an `ise_certificate_authentication_profile` resource in Terraform, setting its name, description, and various authentication parameters. ```terraform resource "ise_certificate_authentication_profile" "example" { name = "CertProf1" description = "My cert profile" allowed_as_user_name = false external_identity_store_name = "[not applicable]" certificate_attribute_name = "SUBJECT_COMMON_NAME" match_mode = "NEVER" username_from = "CERTIFICATE" } ``` -------------------------------- ### Build Terraform Provider for Cisco ISE Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/README.md Compiles the Terraform provider binary using the Go `install` command. This process builds the provider and places the executable in the `$GOPATH/bin` directory, making it ready for use. ```shell go install ``` -------------------------------- ### Create a Network Device Group in Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/network_device_group.md This example demonstrates how to define a `ise_network_device_group` resource in Terraform, setting its name, description, and root group for organizing network devices. ```terraform resource "ise_network_device_group" "example" { name = "Device Type#All Device Types#Group1" description = "My network device group" root_group = "Device Type" } ``` -------------------------------- ### Create a Downloadable ACL Resource in Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/downloadable_acl.md This example demonstrates how to define and create an `ise_downloadable_acl` resource in Terraform, specifying its name, description, DACL content, and type. ```terraform resource "ise_downloadable_acl" "example" { name = "MyACL" description = "My first downloadable ACL" dacl = "permit ip any any" dacl_type = "IPV4" } ``` -------------------------------- ### Example Usage of Network Access Time and Date Condition Data Source Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/data-sources/network_access_time_and_date_condition.md Demonstrates how to use the `ise_network_access_time_and_date_condition` data source to retrieve a specific time and date condition by its ID. ```terraform data "ise_network_access_time_and_date_condition" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` -------------------------------- ### Importing Terraform ISE Device Admin Authorization Global Exception Rule Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/device_admin_authorization_global_exception_rule.md Illustrates the command-line syntax for importing an existing `ise_device_admin_authorization_global_exception_rule` resource into Terraform. The example uses a specific UUID to identify the resource for import. ```shell terraform import ise_device_admin_authorization_global_exception_rule.example "76d24097-41c4-4558-a4d0-a8c07ac08470" ``` -------------------------------- ### Import an Existing ISE Identity Source Sequence Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/identity_source_sequence.md This command-line example shows how to import an existing `ise_identity_source_sequence` resource into your Terraform state. The import operation requires the resource's unique ID. ```shell terraform import ise_identity_source_sequence.example "76d24097-41c4-4558-a4d0-a8c07ac08470" ``` -------------------------------- ### Example Usage of ise_device_admin_authorization_rule_update_rank Resource Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/device_admin_authorization_rule_update_rank.md This Terraform configuration demonstrates how to use the `ise_device_admin_authorization_rule_update_rank` resource. It shows how to specify the `rule_id`, `policy_set_id`, and the desired `rank` to update an existing device administration authorization rule's priority. ```terraform resource "ise_device_admin_authorization_rule_update_rank" "example" { rule_id = "9b3680da-0165-44f6-9cff-88e778d98020" policy_set_id = "d82952cb-b901-4b09-b363-5ebf39bdbaf9" rank = 0 } ``` -------------------------------- ### Run Terraform Provider Acceptance Tests Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/CONTRIBUTING.md Command to execute the full suite of acceptance tests for the Terraform provider. Ensure necessary environment variables like ISE_USERNAME, ISE_PASSWORD, and ISE_URL are set. Note that these tests create real resources. ```shell make testacc ``` -------------------------------- ### Terraform Example Usage for ise_network_device_group Data Source Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/data-sources/network_device_group.md This example demonstrates how to use the `ise_network_device_group` data source to retrieve a specific network device group by its ID. ```terraform data "ise_network_device_group" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` -------------------------------- ### Terraform Resource Example for Network Access Policy Set Rank Update Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/network_access_policy_set_update_ranks.md This example demonstrates how to use the `ise_network_access_policy_set_update_ranks` resource to update the rank of network access policies. It specifies a policy by its ID and assigns a new rank value. ```terraform resource "ise_network_access_policy_set_update_ranks" "example" { policies = [ { id = "d82952cb-b901-4b09-b363-5ebf39bdbaf9" rank = 0 } ] } ``` -------------------------------- ### Example Usage: Update Device Admin Authentication Rule Ranks Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/device_admin_authentication_rule_update_ranks.md Demonstrates how to use the `ise_device_admin_authentication_rule_update_ranks` resource to update the rank field for device administration authentication rules within a specified policy set. This example shows updating a single rule's rank. ```Terraform resource "ise_device_admin_authentication_rule_update_ranks" "example" { policy_set_id = "d82952cb-b901-4b09-b363-5ebf39bdbaf9" rules = [ { id = "3741aca3-db08-4899-af73-2e3f65ec31e1" rank = 0 } ] } ``` -------------------------------- ### Terraform Example: Update Network Access Authentication Rule Rank Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/network_access_authentication_rule_update_rank.md This example demonstrates how to use the `ise_network_access_authentication_rule_update_rank` resource to set the rank of a specific network access authentication rule. It requires the `rule_id`, `policy_set_id`, and the desired `rank` value to bypass the incremental rank assignment limitation. ```terraform resource "ise_network_access_authentication_rule_update_rank" "example" { rule_id = "9b3680da-0165-44f6-9cff-88e778d98020" policy_set_id = "d82952cb-b901-4b09-b363-5ebf39bdbaf9" rank = 0 } ``` -------------------------------- ### Define a TACACS Command Set Resource in Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/tacacs_command_set.md This Terraform configuration defines an `ise_tacacs_command_set` resource named 'example'. It sets the command set's name, description, and specifies whether unmatched commands are permitted. It also includes a list of specific commands with their grant types and arguments. ```terraform resource "ise_tacacs_command_set" "example" { name = "CommandSet1" description = "My TACACS command set" permit_unmatched = true commands = [ { grant = "PERMIT" command = "show" arguments = "" } ] } ``` -------------------------------- ### Configure ISE Endpoint Custom Attribute with Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/endpoint_custom_attribute.md This example demonstrates how to declare an `ise_endpoint_custom_attribute` resource in Terraform, specifying its `attribute_name` as 'isMobile' and `attribute_type` as 'Boolean'. ```terraform resource "ise_endpoint_custom_attribute" "example" { attribute_name = "isMobile" attribute_type = "Boolean" } ``` -------------------------------- ### ise_active_directory_join_point Resource Schema Reference Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/active_directory_join_point.md This section details the complete schema for the `ise_active_directory_join_point` Terraform resource. It outlines all required and optional attributes, their data types, descriptions, default values, and possible choices for enumerated types, providing a comprehensive reference for resource configuration. ```APIDOC ise_active_directory_join_point Resource Schema: Required: - `domain` (String): AD domain associated with the join point - `name` (String): The name of the active directory join point Optional: - `ad_scopes_names` (String): String that contains the names of the scopes that the active directory belongs to. Names are separated by comma. Default: `Default_Scope` - `aging_time` (Number): Aging Time. Default: `5` - `attributes` (Attributes List): List of AD attributes - Nested Schema (`attributes`): - `name` (String) - `type` (String) - `internal_name` (String) - `default_value` (String) - `auth_protection_type` (String): Enable prevent AD account lockout for WIRELESS/WIRED/BOTH. Choices: `WIRELESS`, `WIRED`, `BOTH` - `country` (String): User info attribute - `department` (String): User info attribute - `description` (String): Join point description - `email` (String): User info attribute - `enable_callback_for_dialin_client` (Boolean): Enable Callback For Dial In Client. Default: `false` - `enable_dialin_permission_check` (Boolean): Enable Dial In Permission Check. Default: `false` - `enable_domain_allowed_list` (Boolean). Default: `true` - `enable_failed_auth_protection` (Boolean): Enable prevent AD account lockout due to too many bad password attempts. Default: `false` - `enable_machine_access` (Boolean): Enable Machine Access. Default: `true` - `enable_machine_auth` (Boolean): Enable Machine Authentication. Default: `true` - `enable_pass_change` (Boolean): Enable Password Change. Default: `true` - `enable_rewrites` (Boolean): Enable Rewrites. Default: `false` - `failed_auth_threshold` (Number): Number of bad password attempts. Default: `5` - `first_name` (String): User info attribute - `groups` (Attributes List): List of AD Groups - Nested Schema (`groups`): - `name` (String) - `sid` (String) - `type` (String) - `identity_not_in_ad_behaviour` (String): Identity Not In AD Behaviour. Choices: `REJECT`, `SEARCH_JOINED_FOREST`, `SEARCH_ALL` - `job_title` (String): User info attribute - `last_name` (String): User info attribute - `locality` (String): User info attribute - `organizational_unit` (String): User info attribute - `plaintext_auth` (Boolean): Plain Text Authentication. Default: `false` - `rewrite_rules` (Attributes List): List of Rewrite rules - Nested Schema (`rewrite_rules`): - `row_id` (String) - `rewrite_match` (String) - `rewrite_result` (String) - `schema` (String): Schema. Choices: `ACTIVE_DIRECTORY`, `CUSTOM` - `state_or_province` (String): User info attribute - `street_address` (String): User info attribute - `telephone` (String): User info attribute - `unreachable_domains_behaviour` (String): Unreachable Domains Behaviour. Choices: `PROCEED`, `DROP` ``` -------------------------------- ### Configure ISE Identity Source Sequence Resource Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/identity_source_sequence.md This example demonstrates how to define and configure an `ise_identity_source_sequence` resource in Terraform. It sets the sequence name, description, enables breaking on store failure, specifies a certificate authentication profile, and lists internal identity sources with their order. ```terraform resource "ise_identity_source_sequence" "example" { name = "Sequence1" description = "My identity source sequence" break_on_store_fail = true certificate_authentication_profile = "Preloaded_Certificate_Profile" identity_sources = [ { name = "Internal Users" order = 1 } ] } ``` -------------------------------- ### Retrieve Repository Data by ID (Terraform) Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/data-sources/repository.md This example demonstrates how to retrieve details of an ISE repository using its ID as a data source in Terraform. ```terraform data "ise_repository" "example" { id = "repo1" } ``` -------------------------------- ### Import an Existing ISE Repository Resource Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/repository.md Provides the command-line syntax for importing an existing `ise_repository` resource into your Terraform state, using its unique name. ```shell terraform import ise_repository.example "repo1" ``` -------------------------------- ### Define a TrustSec Security Group Resource in Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/trustsec_security_group.md This example demonstrates how to define an `ise_trustsec_security_group` resource in Terraform, setting its name, description, value, and APIC propagation properties. ```terraform resource "ise_trustsec_security_group" "example" { name = "SGT1234" description = "My SGT" value = 1234 propogate_to_apic = true is_read_only = false } ``` -------------------------------- ### Importing ISE Device Admin Authentication Rule with Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/device_admin_authentication_rule.md Illustrates the command-line syntax for importing an existing ISE device administration authentication rule into Terraform. The example shows how to use `terraform import` with a specific resource and its unique identifiers. ```shell terraform import ise_device_admin_authentication_rule.example "76d24097-41c4-4558-a4d0-a8c07ac08470,76d24097-41c4-4558-a4d0-a8c07ac08470" ``` -------------------------------- ### Retrieve License Tier State with Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/data-sources/license_tier_state.md This example demonstrates how to use the `ise_license_tier_state` data source in Terraform to retrieve the state of a specific license tier by its ID. ```terraform data "ise_license_tier_state" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` -------------------------------- ### Importing Allowed Protocols Configuration Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/allowed_protocols.md Demonstrates how to import an existing allowed protocols configuration into the Terraform state using its unique ID. This allows managing resources created outside of Terraform. ```shell terraform import ise_allowed_protocols.example "76d24097-41c4-4558-a4d0-a8c07ac08470" ``` -------------------------------- ### Importing Terraform ISE Active Directory Join Point Resource Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/active_directory_join_point.md Provides the shell command syntax for importing an existing `ise_active_directory_join_point` resource into Terraform state. The import operation requires the resource's unique ID to link it to a Terraform configuration. ```shell terraform import ise_active_directory_join_point.example "76d24097-41c4-4558-a4d0-a8c07ac08470" ``` -------------------------------- ### Read Device Admin Condition by ID in Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/data-sources/device_admin_condition.md This example demonstrates how to read a Device Admin Condition using its ID with the `ise_device_admin_condition` data source in Terraform. ```terraform data "ise_device_admin_condition" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` -------------------------------- ### Retrieve TrustSec Security Group ACL by ID Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/data-sources/trustsec_security_group_acl.md This Terraform data source example demonstrates how to retrieve a TrustSec Security Group ACL using its unique ID. ```terraform data "ise_trustsec_security_group_acl" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` -------------------------------- ### Read Network Access Dictionary using Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/data-sources/network_access_dictionary.md This example demonstrates how to retrieve a Network Access Dictionary entry by its ID using the `ise_network_access_dictionary` data source in Terraform. ```terraform data "ise_network_access_dictionary" "example" { id = "Dict1" } ``` -------------------------------- ### Define an ISE Network Access Dictionary Resource in Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/network_access_dictionary.md This example demonstrates how to declare and configure an `ise_network_access_dictionary` resource in Terraform, setting its name, description, version, and dictionary attribute type. ```terraform resource "ise_network_access_dictionary" "example" { name = "Dict1" description = "My description" version = "1.1" dictionary_attr_type = "ENTITY_ATTR" } ``` -------------------------------- ### ise_identity_source_sequence Resource Schema Definition Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/identity_source_sequence.md This section details the schema for the `ise_identity_source_sequence` resource, outlining all required, optional, and read-only attributes. It includes definitions for `break_on_store_fail`, `certificate_authentication_profile`, `identity_sources` (with its nested schema), `name`, `description`, and `id`. ```APIDOC ise_identity_source_sequence Resource: Required Attributes: - break_on_store_fail (Boolean): Do not access other stores in the sequence if a selected identity store cannot be accessed for authentication - certificate_authentication_profile (String): Certificate Authentication Profile, empty if doesn't exist - identity_sources (Attributes List): See Nested Schema for `identity_sources` - name (String): The name of the identity source sequence Optional Attributes: - description (String): Description Read-Only Attributes: - id (String): The id of the object Nested Schema for identity_sources: Required Attributes: - name (String): Name of the identity source - order (Number): Order of the identity source in the sequence ``` -------------------------------- ### Configure an ISE Endpoint Resource with Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/endpoint.md This example demonstrates how to define and configure an `ise_endpoint` resource in Terraform, setting its MAC address, description, group, profile, and static assignment properties. ```terraform resource "ise_endpoint" "example" { name = "00:11:22:33:44:55" description = "My endpoint" mac = "00:11:22:33:44:55" group_id = "3a88eec0-8c00-11e6-996c-525400b48521" profile_id = "3a91a150-8c00-11e6-996c-525400b48521" static_profile_assignment = true static_profile_assignment_defined = true static_group_assignment = true static_group_assignment_defined = true } ``` -------------------------------- ### Schema Definition for ise_active_directory_join_domain_with_all_nodes Resource Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/resources/active_directory_join_domain_with_all_nodes.md This section details the schema for the `ise_active_directory_join_domain_with_all_nodes` Terraform resource. It outlines the required and read-only attributes, including the nested `additional_data` schema for specifying extra parameters during the domain join. ```APIDOC ise_active_directory_join_domain_with_all_nodes Resource Schema: Required: - additional_data (Attributes List) - See nested schema below. - join_point_id (String) - Active Directory Join Point ID Read-Only: - id (String) - The id of the object Nested Schema for additional_data: Required: - name (String) - Additional attribute name - value (String) - Additional attribute value ``` -------------------------------- ### Read SXP Domain Filter by ID in Terraform Source: https://github.com/ciscodevnet/terraform-provider-ise/blob/main/docs/data-sources/sxp_domain_filter.md This example demonstrates how to use the `ise_sxp_domain_filter` data source in Terraform to retrieve an SXP Domain Filter by its unique identifier (ID). ```terraform data "ise_sxp_domain_filter" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ```