poddm commented on issue #249:
URL: 
https://github.com/apache/cloudstack-terraform-provider/issues/249#issuecomment-3416442835

   There are a number of issues making importing this resource inoperable.  See 
https://github.com/apache/cloudstack/issues/7837. 
   
   Additionally, it looks like the resource is comparing the `name` to 
`traffictype`.  
   
   ```go
   // Set the type attribute - use the original value from the API call
   // If the Name field is empty, use a default value based on the traffic type 
ID
   if tt.Name != "" {
        d.Set("traffic_type", tt.Name)
   } else {
        // Use a default value based on common traffic types
        // This is a fallback and might not be accurate
        d.Set("traffic_type", "Management")
   }
   ```
   
   Traffic type isn't set in the API spec.  Oddly, as noted in this thread, it 
is returned in the response.
   
https://pkg.go.dev/github.com/apache/cloudstack-go/[email protected]/cloudstack#TrafficType
   
   ```go
   type TrafficType struct {
        Canenableindividualservice   [bool](https://pkg.go.dev/builtin#bool)    
 `json:"canenableindividualservice"`
        Destinationphysicalnetworkid 
[string](https://pkg.go.dev/builtin#string)   
`json:"destinationphysicalnetworkid"`
        Id                           
[string](https://pkg.go.dev/builtin#string)   `json:"id"`
        JobID                        
[string](https://pkg.go.dev/builtin#string)   `json:"jobid"`
        Jobstatus                    [int](https://pkg.go.dev/builtin#int)      
`json:"jobstatus"`
        Name                         
[string](https://pkg.go.dev/builtin#string)   `json:"name"`
        Physicalnetworkid            
[string](https://pkg.go.dev/builtin#string)   `json:"physicalnetworkid"`
        Servicelist                  
[][string](https://pkg.go.dev/builtin#string) `json:"servicelist"`
        State                        
[string](https://pkg.go.dev/builtin#string)   `json:"state"`
   }
   ```


-- 
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]

Reply via email to