### Example Usage Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/device_detail.md This example demonstrates how to use the `catalystcenter_device_detail` data source to fetch details for a device using its ID. ```APIDOC ## catalystcenter_device_detail (Data Source) ### Description This data source fetches device's details, including the assigned physical location. ### Example Usage ```terraform data "catalystcenter_device_detail" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` ### Schema #### Required - `id` (String) - The id of the object #### Read-Only - `collection_status` (String) - Collection status in Catalyst Center, such as "SUCCESS". - `communication_state` (String) - Communication state of the device, such as "REACHABLE". - `cpu` (String) - CPU of the device, such as "1.25". - `device_group_hierarchy_id` (String) - Identifier of the group hierarchy where the device is assigned, such as "/360b1804-969f-4eab-a4ba-9832ea3f1731/26d4bbe6-f908-4b83-86f1-49bfbb1d05f6/". - `device_series` (String) - Device series, such as "Cisco Catalyst 9400 Series Switches". - `ha_status` (String) - High availability status. - `location` (String) - Location of the device as a slash-separated path, such as "Global/USA/New York/DC01". - `mac_address` (String) - MAC address. - `maintenance_mode` (Boolean) - Whether the device is in maintenance mode. - `management_ip_address` (String) - IP address for managing the device. - `memory` (String) - Memory in gigabytes, e.g. "39.186811767835785". - `nw_device_family` (String) - Family of the network device, such as "Switches and Hubs". - `nw_device_id` (String) - As of now, same as `id`. - `nw_device_name` (String) - Name of the device. - `nw_device_role` (String) - Network device role, such as CORE. - `nw_device_type` (String) - Type of network device. - `os_type` (String) - Corresponds to the `catalystcenter_network_devices.devices.*.software_type`. - `overall_health` (Number) - Overall numerical health score. - `platform_id` (String) - Platform identifier, such as "C9KV-UADP-8P". - `policy_tag_name` (String) - Policy tag name. - `serial_number` (String) - Serial number of the device. - `site_hierarchy_graph_id` (String) - Identifier of the site hierarchy graph where the device is assigned, such as "/2b0a78ee-482e-4b4d-ae85-df289873cbbb/76b11b6a-d94a-431b-8bab-fd16b09f5d40/adad4a8a-17ec-4be3-a4b5-b6549b840afe/e8ce8788-9b13-46ec-86c8-740f7ea443c1/". - `software_version` (String) - Software version on the device. - `tag_id_list` (Set of String) - Tags assigned to the device. ``` -------------------------------- ### Example Usage Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/assign_device_to_site.md An example of how to use the catalystcenter_assign_device_to_site data source to retrieve device assignment information for a given site ID. ```APIDOC ## catalystcenter_assign_device_to_site (Data Source) ### Description This data source can read the Assign Device to Site. ### Parameters #### Required - `site_id` (String) - This must be building Id or floor Id. Access points, Sensors are assigned to floor. Remaining network devices are assigned to building. #### Read-Only - `device_ids` (Set of String) - Unassigned network device ID - `id` (String) - The id of the object ### Example Usage ```terraform data "catalystcenter_assign_device_to_site" "example" { site_id = "7ef492ca-b008-479a-9de4-7e40438c7d10" } ``` ``` -------------------------------- ### Example Usage Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/credentials_snmpv2_write.md This example shows how to create a new SNMPv2 write credential. Ensure you provide a unique description and the desired write community string. ```terraform resource "catalystcenter_credentials_snmpv2_write" "example" { description = "My SNMPv2 write credentials" write_community = "community1" } ``` -------------------------------- ### Example Usage of catalystcenter_sync_device_credential Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/sync_device_credential.md This example shows how to use the catalystcenter_sync_device_credential resource to apply a device credential to a specific site. Ensure the credential is already assigned to the site. ```terraform resource "catalystcenter_sync_device_credential" "example" { site_id = "7ef492ca-b008-479a-9de4-7e40438c7d10" device_credential_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" configure_device = false } ``` -------------------------------- ### Example Usage of Device Replacement Data Source Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/device_replacement.md This example shows how to read the Device Replacement data source by providing the ID of the device replacement entry. ```terraform data "catalystcenter_device_replacement" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` -------------------------------- ### Example Usage of catalystcenter_wireless_profile_site_tag Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/wireless_profile_site_tag.md This example demonstrates how to create a Site Tag for a Wireless Profile. Ensure the Wireless Profile is already assigned to the target sites. ```terraform resource "catalystcenter_wireless_profile_site_tag" "example" { wireless_profile_id = "12345678-1234-1234-1234-123456789012" site_tag_name = "SiteTag1" ap_profile_name = "default-ap-profile" site_ids = ["12345678-1234-1234-1234-123456789000"] } ``` -------------------------------- ### Example Usage of catalystcenter_ip_pool Resource Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/ip_pool.md This example demonstrates how to configure a generic IP global pool with specified subnet, gateway, DHCP, and DNS server details. ```terraform resource "catalystcenter_ip_pool" "example" { name = "MyPool1" pool_type = "Generic" address_space_subnet = "192.168.0.0" address_space_prefix_length = 16 address_space_gateway = "192.168.0.1" address_space_dhcp_servers = ["192.168.0.10"] address_space_dns_servers = ["192.168.0.53"] } ``` -------------------------------- ### Example Usage of catalystcenter_image_activation Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/image_activation.md This example demonstrates how to use the catalystcenter_image_activation resource to activate a software image on a specific device. It includes parameters for device UUID, image UUID list, and distribution options. ```terraform resource "catalystcenter_image_activation" "example" { device_uuid = "138b3181-f9c5-4271-9292-cf3152ab4d3e" image_uuid_list = [""] activate_lower_image_version = true distribute_if_needed = true } ``` -------------------------------- ### catalystcenter_wireless_ssid Data Source Example Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/wireless_ssid.md An example of how to use the catalystcenter_wireless_ssid data source to retrieve Wireless SSID information. ```APIDOC ## catalystcenter_wireless_ssid (Data Source) ### Description This data source can read the Wireless SSID. ### Parameters #### Required - **id** (String) - The id of the object - **site_id** (String) - Site ID - only site level Global is supported ### Request Example ```terraform data "catalystcenter_wireless_ssid" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" site_id = "5e8e3e3e-1b6b-4b6b-8b6b-1b6b4b6b8b6b" } ``` ``` -------------------------------- ### Example Usage of Wireless RF Profile Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/wireless_rf_profile.md This example demonstrates how to configure a wireless RF profile with various settings for radio types A and B. Ensure all required parameters are provided for successful resource creation. ```terraform resource "catalystcenter_wireless_rf_profile" "example" { rf_profile_name = "RF_Profile_1" default_rf_profile = false enable_radio_type_a = true enable_radio_type_b = true enable_radio_type6_g_hz = false radio_type_a_parent_profile = "CUSTOM" radio_type_a_radio_channels = "36,40,44,48,124,128,157,161" radio_type_a_data_rates = "6,9,12,18,24,36,48,54" radio_type_a_mandatory_data_rates = "6" radio_type_a_power_threshold_v1 = -60 radio_type_a_rx_sop_threshold = "CUSTOM" radio_type_a_min_power_level = 8 radio_type_a_max_power_level = 20 radio_type_a_channel_width = "20" radio_type_a_custom_rx_sop_threshold = -70 radio_type_b_parent_profile = "HIGH" radio_type_b_radio_channels = "1,6,11" radio_type_b_data_rates = "1,2,5.5,6,9,11,12,18,24,36,48,54" radio_type_b_mandatory_data_rates = "1,2" radio_type_b_power_threshold_v1 = -60 radio_type_b_rx_sop_threshold = "CUSTOM" radio_type_b_min_power_level = 8 radio_type_b_max_power_level = 20 radio_type_b_custom_rx_sop_threshold = -70 } ``` -------------------------------- ### Example Usage of catalystcenter_discovery Data Source Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/discovery.md This example shows how to use the catalystcenter_discovery data source to retrieve information about a specific discovery by its ID. Ensure you have the correct discovery ID. ```terraform data "catalystcenter_discovery" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` -------------------------------- ### Example Usage of catalystcenter_floors Resource Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/floors.md This example demonstrates how to define and manage multiple floors using the catalystcenter_floors resource. It specifies a scope and provides a map of floor configurations, including details like parent hierarchy, name, floor number, RF model, dimensions, and units of measure. ```terraform resource "catalystcenter_floors" "example" { scope = "Global/Poland" floors = { "Global/USA/Building1/Floor1" = { parent_name_hierarchy = "Global/USA/Building1" name = "Floor1" floor_number = 1 rf_model = "Drywall Office Only" width = 40 length = 50.5 height = 3.5 units_of_measure = "meters" } } } ``` -------------------------------- ### Example Usage of catalystcenter_fabric_l3_handoff_ip_transits Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/fabric_l3_handoff_ip_transits.md This example demonstrates how to configure a Layer 3 handoff with IP transit for a fabric device. It includes details such as network device ID, fabric ID, and a list of L3 handoffs with their respective configurations. ```terraform resource "catalystcenter_fabric_l3_handoff_ip_transits" "example" { network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f" l3_handoffs = [ { fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f" network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" transit_network_id = "d71c847b-e9c2-4f13-928c-223372b72b06" interface_name = "TenGigabitEthernet1/0/2" virtual_network_name = "SDA_VN1" vlan_id = 205 tcp_mss_adjustment = 1400 local_ip_address = "10.0.0.1/24" remote_ip_address = "10.0.0.2/24" } ] } ``` -------------------------------- ### Example Usage Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/wireless_fabric_multicast.md Configure wireless multicast for a fabric site by providing the fabric ID and setting the multicast enabled status. ```terraform resource "catalystcenter_wireless_fabric_multicast" "example" { fabric_id = "8e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" multicast_enabled = true } ``` -------------------------------- ### catalystcenter_planned_access_point_position Resource Example Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/planned_access_point_position.md This example demonstrates how to create a planned Access Point position on a floor map using the `catalystcenter_planned_access_point_position` resource. It includes essential details like floor ID, AP name, type, position coordinates, and radio configurations. ```terraform resource "catalystcenter_planned_access_point_position" "example" { floor_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" name = "AP-1001" ap_type = "AP9166I" position_x = 50.5 position_y = 30.2 position_z = 3.5 radios = [ { bands = ["5"] channel = 36 tx_power = 17 antenna_name = "Internal-CW9166I-x-5GHz" antenna_azimuth = 0 antenna_elevation = 0 } ] } ``` -------------------------------- ### Example Usage Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/assign_devices_to_tag.md Use this data source to fetch devices associated with a given tag ID. Ensure you have the correct tag ID before querying. ```terraform data "catalystcenter_assign_devices_to_tag" "example" { tag_id = "ea505070-6bb8-493f-bff0-8058e8e03ee5" } ``` -------------------------------- ### Example Usage of catalystcenter_fabric_l3_handoff_sda_transit Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/fabric_l3_handoff_sda_transit.md This example demonstrates how to configure a Layer 3 handoff for SDA transit using the catalystcenter provider. It includes required parameters like network device ID, fabric ID, and transit network ID, along with optional settings for affinity, multicast, and internet connectivity. ```terraform resource "catalystcenter_fabric_l3_handoff_sda_transit" "example" { network_device_id = "a144a086-750c-4af1-ac57-feab33a69851" fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f" transit_network_id = "d71c847b-e9c2-4f13-928c-223372b72b06" affinity_id_prime = 100 affinity_id_decider = 100 connected_to_internet = false is_multicast_over_transit_enabled = false } ``` -------------------------------- ### Build Terraform Provider Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/CONTRIBUTING.md Build the provider locally using the Go install command after cloning the repository and navigating to its directory. ```shell go install ``` -------------------------------- ### Provision Device Example Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/provision_device.md Use this resource to provision a network device to a specific site. Ensure you have the correct site ID and network device ID. ```terraform resource "catalystcenter_provision_device" "example" { site_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" network_device_id = "4cb565d3-1944-42be-be9f-a87cff79e831" } ``` -------------------------------- ### Example Usage of catalystcenter_fabric_l2_handoff Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/fabric_l2_handoff.md This example demonstrates how to configure a Layer 2 handoff for a fabric device. It requires the network device ID, fabric ID, interface name, and both internal and external VLAN IDs. ```terraform resource "catalystcenter_fabric_l2_handoff" "example" { network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f" interface_name = "GigabitEthernet1/0/4" internal_vlan_id = 300 external_vlan_id = 400 } ``` -------------------------------- ### Update Authentication Profile Example Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/update_authentication_profile.md This example demonstrates how to update an existing authentication profile. Ensure the `fabric_id` and `authentication_profile_name` are correctly specified for the profile you wish to modify. The `dot1x_to_mab_fallback_timeout` and `number_of_hosts` have specific valid ranges and choices. ```terraform resource "catalystcenter_update_authentication_profile" "example" { fabric_id = "ae8a501f-2cdb-4d87-b535-1e568a091de1" authentication_profile_name = "Open Authentication" authentication_order = "mac" dot1x_to_mab_fallback_timeout = 10 wake_on_lan = true number_of_hosts = "Unlimited" } ``` -------------------------------- ### Example Usage Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/anchor_group.md Read the Anchor Group using its ID. ```terraform data "catalystcenter_anchor_group" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` -------------------------------- ### Example Usage of catalystcenter_fabric_l3_handoff_ip_transit Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/fabric_l3_handoff_ip_transit.md This example demonstrates how to configure a Layer 3 Handoff with IP Transit for a fabric device. It includes essential parameters like network device ID, fabric ID, transit network ID, interface name, virtual network name, VLAN ID, TCP MSS adjustment, and IP addresses. ```terraform resource "catalystcenter_fabric_l3_handoff_ip_transit" "example" { network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f" transit_network_id = "d71c847b-e9c2-4f13-928c-223372b72b06" interface_name = "TenGigabitEthernet1/0/2" virtual_network_name = "SDA_VN1" vlan_id = 205 tcp_mss_adjustment = 1400 local_ip_address = "10.0.0.1/24" remote_ip_address = "10.0.0.2/24" } ``` -------------------------------- ### Example Usage Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/assign_templates_to_tag.md Use this data source to fetch the IDs of templates associated with a given tag. Provide the `tag_id` to identify the tag. ```terraform data "catalystcenter_assign_templates_to_tag" "example" { tag_id = "ea505070-6bb8-493f-bff0-8058e8e03ee5" } ``` -------------------------------- ### Manage Wireless SSID Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/wireless_ssid.md Example of how to create and manage a Wireless SSID resource. Ensure all required fields like site_id, ssid, and auth_type are provided. ```terraform resource "catalystcenter_wireless_ssid" "example" { site_id = "5e8e3e3e-1b6b-4b6b-8b6b-1b6b4b6b8b6b" ssid = "mySSID1" auth_type = "WPA3_PERSONAL" passphrase = "Cisco123" fast_lane = false mac_filtering = false ssid_radio_type = "Triple band operation(2.4GHz, 5GHz and 6GHz)" broadcast_ssid = true fast_transition = "ADAPTIVE" session_timeout_enable = true session_timeout = 1800 client_exclusion = true client_exclusion_timeout = 1800 basic_service_set_max_idle = true basic_service_set_client_idle_timeout = 300 directed_multicast_service = true neighbor_list = true mft_client_protection = "OPTIONAL" aaa_override = false protected_management_frame = "REQUIRED" rsn_cipher_suite_ccmp128 = true wlan_type = "Enterprise" auth_key_sae_ext = true ghz24_policy = "dot11-g-only" hex = false random_mac_filter = false } ``` -------------------------------- ### Fabric Site Example Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/fabric_site.md Use this data source to read the Fabric Site by its ID. Ensure the ID is correctly formatted. ```terraform data "catalystcenter_fabric_site" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` -------------------------------- ### Importing catalystcenter_floors Resource Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/floors.md This example shows how to import an existing catalystcenter_floors resource using its ID. The terraform import command is used for this purpose. ```shell terraform import catalystcenter_floors.example "" ``` -------------------------------- ### Importing a catalystcenter_ip_pool Resource Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/ip_pool.md This example shows the command to import an existing IP global pool into Terraform management using its unique ID. ```shell terraform import catalystcenter_ip_pool.example "4b0b7a80-44c0-4bf2-bab5-fc24b4e0a17e" ``` -------------------------------- ### Example Usage Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/fabric_multicast_replication_mode.md Use this data source to read the Fabric Multicast Replication Mode. It requires the fabric ID and the object ID. ```terraform data "catalystcenter_fabric_multicast_replication_mode" "example" { id = "8e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" fabric_id = "8e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" } ``` -------------------------------- ### Example Usage of catalystcenter_credentials_https_read Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/credentials_https_read.md Use this resource to configure HTTPS read credentials. Ensure all required fields like description, username, and password are provided. ```terraform resource "catalystcenter_credentials_https_read" "example" { description = "My HTTPS read credentials" username = "user1" password = "password1" port = 444 } ``` -------------------------------- ### Importing an Existing Resource Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/credentials_snmpv2_write.md This example demonstrates how to import an existing SNMPv2 write credential into your Terraform state. Replace `` with the actual ID of the credential. ```bash terraform import catalystcenter_credentials_snmpv2_write.example "" ``` -------------------------------- ### Scan SBOM for Vulnerabilities with Trivy Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/SBOM.md Use Trivy to scan a CycloneDX SBOM file for vulnerabilities. This requires Trivy to be installed, for example, via Homebrew. ```bash # Install Trivy brew install trivy # Scan SBOM trivy sbom ./sbom/latest/sbom.cyclonedx.json ``` -------------------------------- ### catalystcenter_role Data Source Example Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/role.md Example usage of the catalystcenter_role data source to retrieve role information by its ID. ```APIDOC ## catalystcenter_role (Data Source) ### Description This data source can read the Role. ### Example Usage ```terraform data "catalystcenter_role" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` ### Schema #### Optional - `id` (String) The id of the object - `name` (String) The name of the role #### Read-Only - `description` (String) The description of the role - `resource_types` (Attributes List) The resource types of the role (see [below for nested schema](#nestedatt--resource_types)) ### Nested Schema for `resource_types` Read-Only: - `operations` (Set of String) List of operations allowed for the application. Possible values are `gRead`, `gWrite`, `gUpdate`, `gDelete`, or some combination of these. - `type` (String) Name of the application ``` -------------------------------- ### catalystcenter_network_profile Data Source Example Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/network_profile.md Example usage of the catalystcenter_network_profile data source to retrieve a network profile by its ID. ```APIDOC ## catalystcenter_network_profile (Data Source) ### Description This data source can read the Network Profile. ### Example Usage ```terraform data "catalystcenter_network_profile" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` ### Schema #### Optional - `id` (String) The id of the object - `name` (String) The name of the network profile #### Read-Only - `templates` (Attributes List) (see [below for nested schema](#nestedatt--templates)) - `type` (String) Profile type ### Nested Schema for `templates` Read-Only: - `attributes` (Attributes List) (see [below for nested schema](#nestedatt--templates--attributes)) - `type` (String) Template type ### Nested Schema for `templates.attributes` Read-Only: - `template_id` (String) Template ID ``` -------------------------------- ### Provision Devices Example Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/provision_devices.md Use this resource to provision a list of devices to a specific site. Ensure the site ID and network device IDs are correctly specified. ```terraform resource "catalystcenter_provision_devices" "example" { site_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" provision_devices = [ { site_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" network_device_id = "4cb565d3-1944-42be-be9f-a87cff79e831" } ] } ``` -------------------------------- ### Example Usage of catalystcenter_pnp_config_preview Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/pnp_config_preview.md Use this resource to trigger a Day 0 configuration preview for a specific device within a site. Ensure you have the correct device ID and site ID. ```terraform resource "catalystcenter_pnp_config_preview" "example" { device_id = "65e422375b4b6e40ef3423f8" site_id = "12345678-1234-1234-1234-123456789012" type = "Default" } ``` -------------------------------- ### Example Usage of Provision Devices Data Source Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/provision_devices.md Use this data source to read provisioned devices by specifying the object ID and the site ID. This is useful for retrieving details about devices that have been or can be provisioned. ```terraform data "catalystcenter_provision_devices" "example" { id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" site_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" } ``` -------------------------------- ### List Dependencies from SPDX SBOM Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/SBOM.md Use 'jq' to parse an SPDX SBOM and list the name and version of each package, excluding the provider itself. ```bash # SPDX format jq '.packages[] | select(.name != "terraform-provider-catalystcenter") | {name,version}' sbom/latest/sbom.spdx.json ``` -------------------------------- ### Import Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/wireless_fabric_multicast.md Import an existing wireless fabric multicast configuration using its fabric ID. ```shell terraform import catalystcenter_wireless_fabric_multicast.example "" ``` -------------------------------- ### Start and Stop LAN Automation Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/lan_automation.md Use this resource to start LAN Automation on resource creation and stop it on resource deletion. Configure primary device details, IP pools, and discovery settings. ```terraform resource "catalystcenter_lan_automation" "example" { discovered_device_site_name_hierarchy = "Global/Area1/Area2" primary_device_management_ip_address = "1.2.3.4" primary_device_interface_names = ["HundredGigE1/0/1"] ip_pools = [ { ip_pool_name = "POOL1" ip_pool_role = "MAIN_POOL" } ] multicast_enabled = true host_name_prefix = "TEST" isis_domain_password = "cisco123" redistribute_isis_to_bgp = true discovery_level = 2 discovery_timeout = 20 discovery_devices = [ { device_serial_number = "FOC12345678" device_host_name = "EDGE01" device_site_name_hierarchy = "Global/Area1/Area2" device_management_ip_address = "10.0.0.1" } ] } ``` -------------------------------- ### List Dependencies from CycloneDX SBOM Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/SBOM.md Use 'jq' to parse a CycloneDX SBOM and list the name and version of each component. ```bash # CycloneDX format jq '.components[] | {name,version}' sbom/latest/sbom.cyclonedx.json ``` -------------------------------- ### Basic Image Distribution Example Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/image_distribution.md Use this resource to copy a software image to a specific network device. The image will be copied when the resource is created or recreated. No action is taken on destroy, update, or refresh. ```terraform resource "catalystcenter_image_distribution" "example" { device_uuid = "138b3181-f9c5-4271-9292-cf3152ab4d3e" image_uuid = "faa9c5f7-d093-459a-8164-cc555bbf3b80" } ``` -------------------------------- ### Resource Configuration Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/fabric_multicast_replication_mode.md Example of how to configure the catalystcenter_fabric_multicast_replication_mode resource in Terraform. ```APIDOC ## catalystcenter_fabric_multicast_replication_mode ### Description This resource can manage a Fabric Multicast Replication Mode. ### Schema #### Required - `fabric_id` (String) Fabric Site ID - `replication_mode` (String) Replication Mode deployed in the fabric site - Choices: `HEADEND_REPLICATION`, `NATIVE_MULTICAST` #### Read-Only - `id` (String) The id of the object ### Import Import is supported using the following syntax: The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example: ```shell terraform import catalystcenter_fabric_multicast_replication_mode.example "," ``` ``` -------------------------------- ### Provision Access Points Example Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/provision_access_points.md Use this resource to provision a list of access points to a specific site. Ensure the `site_id` and `rf_profile_name` are correctly set. The `network_devices` block requires at least the `device_id` for each access point. ```terraform resource "catalystcenter_provision_access_points" "example" { network_devices = [ { } ] rf_profile_name = "TYPICAL" site_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" } ``` -------------------------------- ### Import a Device Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/device.md Import an existing device into Catalyst Center management using its unique ID. ```bash terraform import catalystcenter_device.example "4b0b7a80-44c0-4bf2-bab5-fc24b4e0a17e" ``` -------------------------------- ### Import a Banner Setting Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/banner_settings.md Import an existing banner setting using its site ID. This command associates the resource with an already configured banner. ```bash terraform import catalystcenter_banner_settings.example "" ``` -------------------------------- ### catalystcenter_assign_credentials Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/assign_credentials.md Example usage of the catalystcenter_assign_credentials data source to fetch site credential information. ```APIDOC ## catalystcenter_assign_credentials (Data Source) ### Description This data source can read the assigned credentials of a site. ### Parameters #### Required - **id** (String) - The id of the object - **site_id** (String) - The site ID. #### Read-Only - **cli_id** (String) - The ID of the CLI credentials used to access devices at the site. - **https_read_id** (String) - The ID of the HTTP(S) Read credentials. - **https_write_id** (String) - The ID of the HTTP(S) Write credentials. - **snmp_v2_read_id** (String) - The ID of the SNMPv2c Read credentials. - **snmp_v2_write_id** (String) - The ID of the SNMPv2c Write credentials. - **snmp_v3_id** (String) - The ID of the SNMPv3 credentials. ### Request Example ```terraform data "catalystcenter_assign_credentials" "example" { id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" site_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" } ``` ``` -------------------------------- ### Verify SBOM Content Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/SBOM.md Use Syft to scan the current directory, format the output as JSON, and sort artifacts by name. Then, compare this with the published SBOM, sorting its packages by name. Finally, use diff to highlight any discrepancies. ```bash syft scan dir:. -o json | jq -c '.artifacts | sort_by(.name)' > /tmp/current.json jq -c '.packages | sort_by(.name)' sbom/${VERSION}/sbom.spdx.json > /tmp/published.json diff /tmp/current.json /tmp/published.json ``` -------------------------------- ### catalystcenter_update_authentication_profile Data Source Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/update_authentication_profile.md Example usage of the catalystcenter_update_authentication_profile data source to retrieve an authentication profile. ```APIDOC ## catalystcenter_update_authentication_profile (Data Source) ### Description This data source can read the Update Authentication Profile. ### Parameters #### Required - **authentication_profile_name** (String) - The default host authentication template #### Optional - **fabric_id** (String) - ID of the fabric this authentication profile is assigned to. To update a global authentication profile, either remove this property or set its value to null. ### Read-Only Attributes - **authentication_order** (String) - First authentication method - **dot1x_to_mab_fallback_timeout** (Number) - 802.1x Timeout - **id** (String) - The id of the object - **is_bpdu_guard_enabled** (Boolean) - Enable/disable BPDU Guard. Only applicable when authenticationProfileName is set to `Closed Authentication` - **number_of_hosts** (String) - Number of hosts - **pre_auth_acl_access_contracts** (Attributes Set) - Access contract list schema. Omitting this property or setting it to null, will reset the property to its default value. (see [below for nested schema](#nestedatt--pre_auth_acl_access_contracts)) - **pre_auth_acl_description** (String) - Description of the Pre-Authentication ACL - **pre_auth_acl_enabled** (Boolean) - Enable/disable Pre-Authentication ACL - **pre_auth_acl_implicit_action** (String) - Implicit behaviour unless overridden (defaults to `DENY`) - **wake_on_lan** (Boolean) - Wake on LAN ### Nested Schema for `pre_auth_acl_access_contracts` #### Read-Only - **action** (String) - Contract behaviour - **port** (String) - Port for the access contract. The port can only be used once in the Access Contract list. - domain - bootpc - bootps - **protocol** (String) - Protocol for the access contract - UDP - TCP - TCP_UDP ### Example Usage ```terraform data "catalystcenter_update_authentication_profile" "example" { fabric_id = "ae8a501f-2cdb-4d87-b535-1e568a091de1" authentication_profile_name = "Open Authentication" } ``` ``` -------------------------------- ### Import Telemetry Settings Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/resources/telemetry_settings.md Import an existing telemetry settings configuration using its site ID. ```shell terraform import catalystcenter_telemetry_settings.example "" ``` -------------------------------- ### catalystcenter_floor Data Source Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/floor.md Example usage of the catalystcenter_floor data source to retrieve floor details. ```APIDOC ## catalystcenter_floor (Data Source) ### Description This data source can read the Floor. ### Schema #### Required - `id` (String) - The id of the object - `units_of_measure` (String) - The unit of measurement #### Read-Only - `floor_number` (Number) - Floor number - `height` (Number) - Height - `length` (Number) - Length - `name` (String) - Floor name - `parent_id` (String) - The ID of the parent building - `rf_model` (String) - The RF model - `width` (Number) - Width ### Example Usage ```terraform data "catalystcenter_floor" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" units_of_measure = "meters" } ``` ``` -------------------------------- ### catalystcenter_fabric_zone Data Source Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/fabric_zone.md Example usage of the catalystcenter_fabric_zone data source to retrieve Fabric Zone information. ```APIDOC ## catalystcenter_fabric_zone (Data Source) ### Description This data source can read the Fabric Zone. ### Parameters #### Query Parameters - **site_id** (String) - Required - ID of the network hierarchy ### Response #### Success Response (200) - **id** (String) - The id of the object - **authentication_profile_name** (String) - Authentication profile used for this fabric ``` -------------------------------- ### catalystcenter_fabric_device Data Source Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/fabric_device.md Example usage of the catalystcenter_fabric_device data source to retrieve fabric device details. ```APIDOC ## catalystcenter_fabric_device (Data Source) ### Description This data source can read the Fabric Device. ### Parameters #### Required - **fabric_id** (String) - ID of the fabric site/zone of this fabric device - **network_device_id** (String) - Network device ID of the fabric device #### Read-Only - **border_priority** (Number) - Border priority of the fabric border device. A lower value indicates higher priority - **border_types** (Set of String) - List of the border types of the fabric device. Allowed values are [LAYER_2, LAYER_3] - **default_exit** (Boolean) - Set this to make the fabric border device the gateway of last resort for this site. Any unknown traffic will be sent to this fabric border device from edge nodes - **device_roles** (Set of String) - List of the roles of the fabric device. Allowed values are [CONTROL_PLANE_NODE, EDGE_NODE, BORDER_NODE] - **id** (String) - The id of the object - **import_external_routes** (Boolean) - Set this to import external routes from other routing protocols (such as BGP) to the fabric control plane - **local_autonomous_system_number** (String) - BGP Local autonomous system number of the fabric border device - **prepend_autonomous_system_count** (Number) - Prepend autonomous system count of the fabric border device ### Example Usage ```terraform data "catalystcenter_fabric_device" "example" { network_device_id = "5e6f7b3a-2b0b-4a7d-8b1c-0d4b1cd5e1b1" fabric_id = "c4b85bb2-ce3f-4db9-a32b-e439a388ac2f" } ``` ``` -------------------------------- ### Authentication Policy Server Example Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/authentication_policy_server.md Use this data source to retrieve the configuration of an existing Authentication Policy Server by its ID. Ensure the ID is valid and corresponds to a configured server. ```terraform data "catalystcenter_authentication_policy_server" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` -------------------------------- ### catalystcenter_credentials_snmpv3 Data Source Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/credentials_snmpv3.md Example usage of the catalystcenter_credentials_snmpv3 data source to retrieve SNMPv3 credentials by their ID. ```APIDOC ## catalystcenter_credentials_snmpv3 Data Source ### Description This data source can read the Credentials SNMPv3. ### Method Not applicable (Data Source) ### Endpoint Not applicable (Data Source) ### Parameters #### Optional - **description** (String) - The description of the SNMPv3 credentials - **id** (String) - The id of the object ### Read-Only Attributes - **auth_password** (String) - Authentication password - **auth_type** (String) - Authentication type - **privacy_password** (String) - Privacy password - **privacy_type** (String) - Privacy type - **snmp_mode** (String) - SNMP mode - **username** (String) - Username ### Request Example ```terraform data "catalystcenter_credentials_snmpv3" "example" { id = "76d24097-41c4-4558-a4d0-a8c07ac08470" } ``` ### Response Example (Response details are read-only attributes listed above) ``` -------------------------------- ### Example Usage of catalystcenter_assign_device_to_site Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/assign_device_to_site.md Use this data source to fetch details of devices assigned to a particular site. Provide the `site_id` which can be a building ID or a floor ID. ```terraform data "catalystcenter_assign_device_to_site" "example" { site_id = "7ef492ca-b008-479a-9de4-7e40438c7d10" } ``` -------------------------------- ### catalystcenter_assign_devices_to_tag Source: https://github.com/ciscodevnet/terraform-provider-catalystcenter/blob/main/docs/data-sources/assign_devices_to_tag.md Example usage of the catalystcenter_assign_devices_to_tag data source to retrieve devices associated with a given tag ID. ```APIDOC ## catalystcenter_assign_devices_to_tag (Data Source) ### Description This data source can read the Assign Devices to Tag. ### Parameters #### Query Parameters - **tag_id** (String) - Required - Tag Id to be associated with the device ### Response #### Success Response (200) - **device_ids** (Set of String) - Device Ids List - **id** (String) - The id of the object ### Request Example ```terraform data "catalystcenter_assign_devices_to_tag" "example" { tag_id = "ea505070-6bb8-493f-bff0-8058e8e03ee5" } ``` ```