We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed7ac8c commit 0ab9c98Copy full SHA for 0ab9c98
cloudstack/data_source_cloudstack_vpc.go
@@ -37,6 +37,11 @@ func dataSourceCloudstackVPC() *schema.Resource {
37
Schema: map[string]*schema.Schema{
38
"filter": dataSourceFiltersSchema(),
39
40
+ "projectid": {
41
+ Type: schema.TypeString,
42
+ Optional: true,
43
+ },
44
+
45
//Computed values
46
"name": {
47
Type: schema.TypeString,
@@ -81,6 +86,9 @@ func dataSourceCloudstackVPC() *schema.Resource {
81
86
func datasourceCloudStackVPCRead(d *schema.ResourceData, meta interface{}) error {
82
87
cs := meta.(*cloudstack.CloudStackClient)
83
88
p := cs.VPC.NewListVPCsParams()
89
+ if d.Get("projectid") != "" {
90
+ p.SetProjectid(d.Get("projectid").(string))
91
+ }
84
92
csVPCs, err := cs.VPC.ListVPCs(p)
85
93
94
if err != nil {
0 commit comments