Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: data equinix_network_device_type returns more than 1 result #46

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions modules/c8000v/main.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
data "equinix_network_device_type" "this" {
category = "ROUTER"
vendor = "Cisco"
locals {
equinix_network_device_type_code = "C8000V"
}

data "equinix_network_device_platform" "this" {
device_type = data.equinix_network_device_type.this.code
device_type = local.equinix_network_device_type_code
flavor = var.platform
}

data "equinix_network_device_software" "this" {
device_type = data.equinix_network_device_type.this.code
device_type = local.equinix_network_device_type_code
packages = [var.software_package]
stable = true
most_recent = true
Expand All @@ -21,7 +20,7 @@ resource "equinix_network_device" "non_cluster" {
name = var.name
project_id = var.project_id
hostname = var.hostname
type_code = data.equinix_network_device_type.this.code
type_code = local.equinix_network_device_type_code
package_code = var.software_package
version = data.equinix_network_device_software.this.version
core_count = data.equinix_network_device_platform.this.core_count
Expand Down
Loading