apache / apache/cloudstack-terraform-provider

Traffic Types not handled correctly

Open
#249 9 comments 0 reactions 1 assignee Claimed by @Pearl1594 View on GitHub
networking
Dominant language
Go
Stars
53
Forks
67
Avg merge
3d 14h
Merged PRs (30d)
15

Description

I tried to import traffic types into terraform, but they all got imported as "Management".

The problem is that it looks for 'name', which doesn't exist, so it always defaults to Management. The API returns 'traffictype'.

This appears to be an issue also /w the upstream cloudstack go library, and even the freaking API documentation. 🤪

Here is what I get when I do the request via cloudmonkey, and I confirmed I got the same results from CloudStack python package.
```
{
"count": 4,
"traffictype": [
{
"id": "b20ba0e0-5c8c-4cb7-ab68-8fe3e011a336",
"physicalnetworkid": "ad0e9614-6d9c-41c8-9459-7539673b2107",
"traffictype": "Guest"
},
{
"id": "9f2b4227-653c-4523-b848-4dc889e2c8ff",
"kvmnetworklabel": "cloudbr0",
"physicalnetworkid": "ad0e9614-6d9c-41c8-9459-7539673b2107",
"traffictype": "Management"
},
{
"id": "5de01b4b-1448-4ee6-af4c-529a50966527",
"kvmnetworklabel": "cloudbr0",
"physicalnetworkid": "ad0e9614-6d9c-41c8-9459-7539673b2107",
"traffictype": "Public"
},
{
"id": "52c4901f-467c-414d-9cdd-534a0fb8195e",
"kvmnetworklabel": "cloudbr0",
"physicalnetworkid": "ad0e9614-6d9c-41c8-9459-7539673b2107",
"traffictype": "Storage"
}
]
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.