kiranchavala commented on issue #249:
URL:
https://github.com/apache/cloudstack-terraform-provider/issues/249#issuecomment-3415568434
@ilsaloving-gander I am unable to reproduce the issue
```
resource "cloudstack_traffic_type" "management" {
physical_network_id = "79213e81-1498-45f6-ae02-02524c3b9831"
type = "Management"
kvm_network_label = "cloudbr0"
xen_network_label = "xenbr0"
vmware_network_label = "VM Network"
}
```
Get the traffic type id from cmk
```
(localcloud) 🐱 > list traffictypes
physicalnetworkid=79213e81-1498-45f6-ae02-02524c3b9831
{
"count": 2,
"traffictype": [
{
"id": "d952bc43-214d-4df6-addb-b055d2a842b2",
"kvmnetworklabel": "cloudbr0",
"physicalnetworkid": "79213e81-1498-45f6-ae02-02524c3b9831",
"traffictype": "Management",
"vmwarenetworklabel": "vSwitch0,,vmwaresvs",
"xennetworklabel": "Network0"
},
{
"id": "d2d1c8f7-ae4f-45f4-9b29-e3f45ed8d0d9",
"kvmnetworklabel": "cloudbr0",
"physicalnetworkid": "79213e81-1498-45f6-ae02-02524c3b9831",
"traffictype": "Storage",
"vmwarenetworklabel": "vSwitch0,,vmwaresvs",
"xennetworklabel": "Network0"
}
]
}
```
```
TF_LOG=DEBUG terraform import cloudstack_traffic_type.management
"d952bc43-214d-4df6-addb-b055d2a842b2"
2025-10-17T18:35:52.189+0530 [INFO] Terraform version: 1.12.1
2025-10-17T18:35:52.189+0530 [DEBUG] using github.com/hashicorp/go-tfe
v1.74.1
2025-10-17T18:35:52.189+0530 [DEBUG] using github.com/hashicorp/hcl/v2
v2.23.1-0.20250203194505-ba0759438da2
2025-10-17T18:35:52.190+0530 [DEBUG] using
github.com/hashicorp/terraform-svchost v0.1.1
2025-10-17T18:35:52.190+0530 [DEBUG] using github.com/zclconf/go-cty v1.16.2
2025-10-17T18:35:52.190+0530 [INFO] Go runtime version: go1.24.2
2025-10-17T18:35:52.190+0530 [INFO] CLI args: []string{"terraform",
"import", "cloudstack_traffic_type.management",
"d952bc43-214d-4df6-addb-b055d2a842b2"}
2025-10-17T18:35:52.190+0530 [DEBUG] Attempting to open CLI config file:
/Users/kiranchavala/.terraformrc
2025-10-17T18:35:52.190+0530 [DEBUG] File doesn't exist, but doesn't need
to. Ignoring.
2025-10-17T18:35:52.190+0530 [DEBUG] checking for credentials in
"/Users/kiranchavala/.terraform.d/plugins"
2025-10-17T18:35:52.190+0530 [DEBUG] ignoring non-existing provider search
directory terraform.d/plugins
2025-10-17T18:35:52.190+0530 [DEBUG] will search for provider plugins in
/Users/kiranchavala/.terraform.d/plugins
2025-10-17T18:35:52.190+0530 [DEBUG] ignoring non-existing provider search
directory /Users/kiranchavala/Library/Application Support/io.terraform/plugins
2025-10-17T18:35:52.190+0530 [DEBUG] ignoring non-existing provider search
directory /Library/Application Support/io.terraform/plugins
2025-10-17T18:35:52.190+0530 [INFO] CLI command args: []string{"import",
"cloudstack_traffic_type.management", "d952bc43-214d-4df6-addb-b055d2a842b2"}
2025-10-17T18:35:52.220+0530 [DEBUG] checking for provisioner in "."
2025-10-17T18:35:52.222+0530 [DEBUG] checking for provisioner in
"/opt/homebrew/bin"
2025-10-17T18:35:52.222+0530 [DEBUG] checking for provisioner in
"/Users/kiranchavala/.terraform.d/plugins"
2025-10-17T18:35:52.225+0530 [DEBUG] Building and walking import graph
2025-10-17T18:35:52.225+0530 [DEBUG] Not attaching any node states: overall
state is nil
2025-10-17T18:35:52.225+0530 [DEBUG] No state, no orphan outputs
2025-10-17T18:35:52.225+0530 [DEBUG] ProviderTransformer:
"cloudstack_traffic_type.management (expand)"
(*terraform.nodeExpandPlannableResource) needs
provider["registry.terraform.io/cloudstack/cloudstack"]
2025-10-17T18:35:52.226+0530 [DEBUG] created provider logger: level=debug
2025-10-17T18:35:52.226+0530 [INFO] provider: configuring client automatic
mTLS
2025-10-17T18:35:52.235+0530 [DEBUG] provider: starting plugin:
path=.terraform/providers/registry.terraform.io/cloudstack/cloudstack/0.6.0-rc3/darwin_arm64/terraform-provider-cloudstack
args=[".terraform/providers/registry.terraform.io/cloudstack/cloudstack/0.6.0-rc3/darwin_arm64/terraform-provider-cloudstack"]
2025-10-17T18:35:52.237+0530 [DEBUG] provider: plugin started:
path=.terraform/providers/registry.terraform.io/cloudstack/cloudstack/0.6.0-rc3/darwin_arm64/terraform-provider-cloudstack
pid=68333
2025-10-17T18:35:52.237+0530 [DEBUG] provider: waiting for RPC address:
plugin=.terraform/providers/registry.terraform.io/cloudstack/cloudstack/0.6.0-rc3/darwin_arm64/terraform-provider-cloudstack
2025-10-17T18:35:52.259+0530 [INFO] provider.terraform-provider-cloudstack:
configuring server automatic mTLS: timestamp="2025-10-17T18:35:52.259+0530"
2025-10-17T18:35:52.269+0530 [DEBUG] provider.terraform-provider-cloudstack:
plugin address:
address=/var/folders/2f/6r19_y2s5p92vdzq4l29n0lr0000gn/T/plugin2420082724
network=unix timestamp="2025-10-17T18:35:52.268+0530"
2025-10-17T18:35:52.269+0530 [DEBUG] provider: using plugin: version=6
2025-10-17T18:35:52.285+0530 [DEBUG] provider.stdio: received EOF, stopping
recv loop: err="rpc error: code = Unavailable desc = error reading from server:
EOF"
2025-10-17T18:35:52.286+0530 [INFO] provider: plugin process exited:
plugin=.terraform/providers/registry.terraform.io/cloudstack/cloudstack/0.6.0-rc3/darwin_arm64/terraform-provider-cloudstack
id=68333
2025-10-17T18:35:52.286+0530 [DEBUG] provider: plugin exited
2025-10-17T18:35:52.286+0530 [DEBUG] ReferenceTransformer:
"var.cloudstack_api_url" references: []
2025-10-17T18:35:52.286+0530 [DEBUG] ReferenceTransformer:
"var.cloudstack_api_key" references: []
2025-10-17T18:35:52.286+0530 [DEBUG] ReferenceTransformer:
"var.cloudstack_secret_key" references: []
2025-10-17T18:35:52.286+0530 [DEBUG] ReferenceTransformer:
"provider[\"registry.terraform.io/cloudstack/cloudstack\"]" references:
[var.cloudstack_api_key var.cloudstack_api_url var.cloudstack_secret_key]
2025-10-17T18:35:52.286+0530 [DEBUG] ReferenceTransformer:
"cloudstack_traffic_type.management (expand)" references: []
2025-10-17T18:35:52.286+0530 [DEBUG] Starting graph walk: walkImport
2025-10-17T18:35:52.287+0530 [DEBUG] created provider logger: level=debug
2025-10-17T18:35:52.287+0530 [INFO] provider: configuring client automatic
mTLS
2025-10-17T18:35:52.290+0530 [DEBUG] provider: starting plugin:
path=.terraform/providers/registry.terraform.io/cloudstack/cloudstack/0.6.0-rc3/darwin_arm64/terraform-provider-cloudstack
args=[".terraform/providers/registry.terraform.io/cloudstack/cloudstack/0.6.0-rc3/darwin_arm64/terraform-provider-cloudstack"]
2025-10-17T18:35:52.292+0530 [DEBUG] provider: plugin started:
path=.terraform/providers/registry.terraform.io/cloudstack/cloudstack/0.6.0-rc3/darwin_arm64/terraform-provider-cloudstack
pid=68334
2025-10-17T18:35:52.292+0530 [DEBUG] provider: waiting for RPC address:
plugin=.terraform/providers/registry.terraform.io/cloudstack/cloudstack/0.6.0-rc3/darwin_arm64/terraform-provider-cloudstack
2025-10-17T18:35:52.304+0530 [INFO] provider.terraform-provider-cloudstack:
configuring server automatic mTLS: timestamp="2025-10-17T18:35:52.304+0530"
2025-10-17T18:35:52.313+0530 [DEBUG] provider.terraform-provider-cloudstack:
plugin address:
address=/var/folders/2f/6r19_y2s5p92vdzq4l29n0lr0000gn/T/plugin856108897
network=unix timestamp="2025-10-17T18:35:52.313+0530"
2025-10-17T18:35:52.313+0530 [DEBUG] provider: using plugin: version=6
2025-10-17T18:35:52.325+0530 [DEBUG] ReferenceTransformer:
"cloudstack_traffic_type.management (import id
\"d952bc43-214d-4df6-addb-b055d2a842b2\")" references: []
cloudstack_traffic_type.management: Importing from ID
"d952bc43-214d-4df6-addb-b055d2a842b2"...
cloudstack_traffic_type.management: Import prepared!
Prepared cloudstack_traffic_type for import
cloudstack_traffic_type.management: Refreshing state...
[id=d952bc43-214d-4df6-addb-b055d2a842b2]
2025-10-17T18:35:54.917+0530 [DEBUG] provider.stdio: received EOF, stopping
recv loop: err="rpc error: code = Unavailable desc = error reading from server:
EOF"
2025-10-17T18:35:54.918+0530 [INFO] provider: plugin process exited:
plugin=.terraform/providers/registry.terraform.io/cloudstack/cloudstack/0.6.0-rc3/darwin_arm64/terraform-provider-cloudstack
id=68334
2025-10-17T18:35:54.918+0530 [DEBUG] provider: plugin exited
2025-10-17T18:35:54.918+0530 [INFO] Writing state output to:
Import successful!
```
```
terraform show
# cloudstack_traffic_type.management:
resource "cloudstack_traffic_type" "management" {
id = "d952bc43-214d-4df6-addb-b055d2a842b2"
kvm_network_label = "cloudbr0"
physical_network_id = "79213e81-1498-45f6-ae02-02524c3b9831"
traffic_type = "Management"
xen_network_label = "xenbr0"
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]