Re: [PR] Add `cloudstack_domain` as a data source [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


DaanHoogland closed pull request #195: Add `cloudstack_domain` as a data source
URL: https://github.com/apache/cloudstack-terraform-provider/pull/195


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] chore(deps): bump github.com/hashicorp/terraform-plugin-framework-validators from 0.12.0 to 0.18.0 [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


dependabot[bot] commented on PR #183:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/183#issuecomment-3266093323

   OK, I won't notify you again about this release, but will get in touch when 
a new version is available. If you'd rather skip all updates until the next 
major or minor version, let me know by commenting `@dependabot ignore this 
major version` or `@dependabot ignore this minor version`. You can also ignore 
all major, minor, or patch releases for a dependency by adding an [`ignore` 
condition](https://docs.github.com/en/code-security/supply-chain-security/configuration-options-for-dependency-updates#ignore)
 with the desired `update_types` to your config file.
   
   If you change your mind, just re-open this PR and I'll resolve any conflicts 
on it.


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] chore(deps): bump github.com/hashicorp/terraform-plugin-mux from 0.15.0 to 0.20.0 [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


DaanHoogland closed pull request #186: chore(deps): bump 
github.com/hashicorp/terraform-plugin-mux from 0.15.0 to 0.20.0
URL: https://github.com/apache/cloudstack-terraform-provider/pull/186


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] chore(deps): bump github.com/hashicorp/terraform-plugin-sdk/v2 from 2.33.0 to 2.37.0 [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


dependabot[bot] commented on PR #187:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/187#issuecomment-3266096623

   OK, I won't notify you again about this release, but will get in touch when 
a new version is available. If you'd rather skip all updates until the next 
major or minor version, let me know by commenting `@dependabot ignore this 
major version` or `@dependabot ignore this minor version`. You can also ignore 
all major, minor, or patch releases for a dependency by adding an [`ignore` 
condition](https://docs.github.com/en/code-security/supply-chain-security/configuration-options-for-dependency-updates#ignore)
 with the desired `update_types` to your config file.
   
   If you change your mind, just re-open this PR and I'll resolve any conflicts 
on it.


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] chore(deps): bump github.com/hashicorp/terraform-plugin-go from 0.22.1 to 0.28.0 [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


dependabot[bot] commented on PR #185:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/185#issuecomment-3266094885

   OK, I won't notify you again about this release, but will get in touch when 
a new version is available. If you'd rather skip all updates until the next 
major or minor version, let me know by commenting `@dependabot ignore this 
major version` or `@dependabot ignore this minor version`. You can also ignore 
all major, minor, or patch releases for a dependency by adding an [`ignore` 
condition](https://docs.github.com/en/code-security/supply-chain-security/configuration-options-for-dependency-updates#ignore)
 with the desired `update_types` to your config file.
   
   If you change your mind, just re-open this PR and I'll resolve any conflicts 
on it.


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `cloudstack_limits` data source and resource [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


vishesh92 commented on code in PR #197:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/197#discussion_r2329653567


##
cloudstack/data_source_cloudstack_limits.go:
##
@@ -0,0 +1,210 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package cloudstack
+
+import (
+   "bytes"
+   "crypto/sha256"
+   "encoding/hex"
+   "fmt"
+
+   "github.com/apache/cloudstack-go/v2/cloudstack"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
+)
+
+func dataSourceCloudStackLimits() *schema.Resource {
+   return &schema.Resource{
+   Read: dataSourceCloudStackLimitsRead,
+   Schema: map[string]*schema.Schema{
+   "type": {
+   Type: schema.TypeString,
+   Optional: true,
+   ValidateFunc: validation.StringInSlice([]string{
+   "instance", "ip", "volume", "snapshot", 
"template", "project", "network", "vpc",
+   "cpu", "memory", "primarystorage", 
"secondarystorage",
+   }, false), // false disables case-insensitive 
matching
+   Description: "The type of resource to list the 
limits. Available types are: " +
+   "instance, ip, volume, snapshot, 
template, project, network, vpc, cpu, memory, " +
+   "primarystorage, secondarystorage",
+   },
+   "account": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List resources by account. Must 
be used with the domain_id parameter.",
+   },
+   "domain_id": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List only resources belonging to 
the domain specified.",
+   },
+   "projectid": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List resource limits by project.",
+   },
+   "limits": {
+   Type: schema.TypeList,
+   Computed: true,
+   Elem: &schema.Resource{
+   Schema: map[string]*schema.Schema{
+   "resourcetype": {
+   Type: 
schema.TypeString,
+   Computed: true,
+   },
+   "resourcetypename": {
+   Type: 
schema.TypeString,
+   Computed: true,
+   },
+   "account": {
+   Type: 
schema.TypeString,
+   Computed: true,
+   },
+   "domain": {
+   Type: 
schema.TypeString,
+   Computed: true,
+   },
+   "domain_id": {
+   Type: 
schema.TypeString,
+   Computed: true,
+   },

Review Comment:
   Can we merge both `domain` & `domainid`?



-- 
This is an automated mess

Re: [PR] chore(deps): bump github.com/hashicorp/terraform-plugin-framework from 1.7.0 to 1.15.1 [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


DaanHoogland commented on PR #199:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/199#issuecomment-3265662443

   @dependabot rebase


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



RE: [LTS] Extend LTS support to 24 months

2025-09-08 Thread David Knuth
We enterprises definitely appreciate it!

-Original Message-
From: Rohit Yadav 
Sent: Monday, September 8, 2025 9:57 AM
To: us...@cloudstack.apache.org
Cc: dev@cloudstack.apache.org
Subject: Re: [LTS] Extend LTS support to 24 months

EXTERNAL

All - this thread is NOT about versioning scheme or releases process.

For those who want tl;dr - this thread is only about LTS release support 
timeline, extending the support from 18 to 24 months.


Regards.





From: Chi vediamo 
Sent: Monday, September 8, 2025 17:36
To: us...@cloudstack.apache.org 
Cc: dev@cloudstack.apache.org 
Subject: Re: [LTS] Extend LTS support to 24 months

I am with you Daan,

Apologies. Not sure If I Should have a voice here - as you are both and @wei  
are masters of this platform - I am with you both on this idea.

There has to be a froze date established for new features. While something 
defined as Feature Improvement will have to wait until Next minor release - 
even For existing features -  If it's following the semantic versioning 
MajorYear.Minor.patch If the Major will Keep as 4. the minor release can have 3 
digits QYY first digit the Quarter and 2 digits for the year  Major,QYY,patch


Tata Y.



> On Sep 8, 2025, at 3:43 AM, Daan Hoogland  wrote:
>
> Rohit,
> I don't mind if we have only one supported version for a while. It
> will mean more focus on that version and the release process.
> I have a few remarks though,
> 1. We have a feature release per LTS, so why not just do the feature
> release in spring and start the maintenance branch in autumn. We can
> then for .1 be lenient on new features. If we use year numbers as
> versions there can never be misunderstanding.
> 2. Does it make sense to have support for Blocker defects on a branch
> that has been in maintenance for 18 months already?
>
> On Mon, Sep 8, 2025 at 8:06 AM Rohit Yadav  wrote:
>>
>> All,
>>
>> The guidelines on regular & LTS releases [1] defined support timelines for 
>> doing maintenance and security releases. Historically we had both regular 
>> and LTS releases, however, over time, all releases effectively became LTS 
>> releases and made maintenance and release efforts unsustainable. The recent 
>> re-introduction of regular releases (starting with v4.21), will allow annual 
>> LTS release efforts to be more sustainable moving forward (the next LTS 
>> v4.22 is already in the works).
>>
>> Adopting a cadence of one regular release and one LTS release annually will 
>> improve sustainability. This (old) model will enable us to deliver 
>> feature-rich regular releases (typically supported until the next release or 
>> up to six months, whichever comes first), while allowing us to focus more 
>> thoroughly on LTS releases. As a result, we can potentially extend LTS 
>> support timeline from 18 to 24 months. That said, this transition presents a 
>> short-term challenge -- once v4.20 reaches EOL in July 2026, only one 
>> actively supported LTS release (v4.22) will remain, creating a temporary gap 
>> in overlapping LTS support.
>>
>> Considering this, the following two changes are proposed in the LTS 
>> guidelines [1]:
>>
>> 1. Extend the LTS support cycle [1], from 18 to 24 months as follows:
>> LTS branches are supported for a total of 24 months in the following manner:
>>
>>  *
>> 1-18 months: All defect fixes, improvements, as well as Blocker, Critical, 
>> CVEs fixes identified in the LTS branch will be merged and shipped as part 
>> of proactive maintenance releases.
>>  *
>> 18-24 months: All Blocker defects and CVEs that impact the LTS branch will 
>> be merged and shipped as part of security/maintenance releases as needed.
>>
>> 2. Extend the EOL date for 4.20 from 1st July 2026 to 1st Jan 2027, i.e. by 
>> 6-months.
>>
>> Please review and share your thoughts and comments. A formal vote may not be 
>> necessary if there are no objections.
>>
>> [1]
>> https://urldefense.com/v3/__https://cwiki.apache.org/confluence/displ
>> ay/CLOUDSTACK/LTS__;!!P9cq_d3Gyw!jsnCI_9AUruTd1U-MdQP8j2_GSH4P9t2cst3
>> xP31yO4tZXgmHI9Ojzsgd7XKuzG70cYzqbfQUvw3QrqX3QWJ1Nc$
>>
>> Thanks and Regards,
>> Rohit Yadav
>>
>>
>>
>
>
> --
> Daan




[David 
Knuth]


Re: [PR] Add `cloudstack_limits` data source and resource [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


ianc769 commented on code in PR #197:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/197#discussion_r2330386344


##
cloudstack/data_source_cloudstack_limits.go:
##
@@ -0,0 +1,210 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package cloudstack
+
+import (
+   "bytes"
+   "crypto/sha256"
+   "encoding/hex"
+   "fmt"
+
+   "github.com/apache/cloudstack-go/v2/cloudstack"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
+)
+
+func dataSourceCloudStackLimits() *schema.Resource {
+   return &schema.Resource{
+   Read: dataSourceCloudStackLimitsRead,
+   Schema: map[string]*schema.Schema{
+   "type": {
+   Type: schema.TypeString,
+   Optional: true,
+   ValidateFunc: validation.StringInSlice([]string{
+   "instance", "ip", "volume", "snapshot", 
"template", "project", "network", "vpc",
+   "cpu", "memory", "primarystorage", 
"secondarystorage",
+   }, false), // false disables case-insensitive 
matching
+   Description: "The type of resource to list the 
limits. Available types are: " +
+   "instance, ip, volume, snapshot, 
template, project, network, vpc, cpu, memory, " +
+   "primarystorage, secondarystorage",
+   },
+   "account": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List resources by account. Must 
be used with the domain_id parameter.",
+   },
+   "domain_id": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List only resources belonging to 
the domain specified.",
+   },
+   "projectid": {

Review Comment:
   thoughts on changing it to `project` here but making a separate issue/pr to 
update it to `projectid` everywhere else to be more consistent? I was mostly 
just using the elements directly from the api page for cloudstack.



-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `cloudstack_limits` data source and resource [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


vishesh92 commented on code in PR #197:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/197#discussion_r2329653567


##
cloudstack/data_source_cloudstack_limits.go:
##
@@ -0,0 +1,210 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package cloudstack
+
+import (
+   "bytes"
+   "crypto/sha256"
+   "encoding/hex"
+   "fmt"
+
+   "github.com/apache/cloudstack-go/v2/cloudstack"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
+)
+
+func dataSourceCloudStackLimits() *schema.Resource {
+   return &schema.Resource{
+   Read: dataSourceCloudStackLimitsRead,
+   Schema: map[string]*schema.Schema{
+   "type": {
+   Type: schema.TypeString,
+   Optional: true,
+   ValidateFunc: validation.StringInSlice([]string{
+   "instance", "ip", "volume", "snapshot", 
"template", "project", "network", "vpc",
+   "cpu", "memory", "primarystorage", 
"secondarystorage",
+   }, false), // false disables case-insensitive 
matching
+   Description: "The type of resource to list the 
limits. Available types are: " +
+   "instance, ip, volume, snapshot, 
template, project, network, vpc, cpu, memory, " +
+   "primarystorage, secondarystorage",
+   },
+   "account": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List resources by account. Must 
be used with the domain_id parameter.",
+   },
+   "domain_id": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List only resources belonging to 
the domain specified.",
+   },
+   "projectid": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List resource limits by project.",
+   },
+   "limits": {
+   Type: schema.TypeList,
+   Computed: true,
+   Elem: &schema.Resource{
+   Schema: map[string]*schema.Schema{
+   "resourcetype": {
+   Type: 
schema.TypeString,
+   Computed: true,
+   },
+   "resourcetypename": {
+   Type: 
schema.TypeString,
+   Computed: true,
+   },
+   "account": {
+   Type: 
schema.TypeString,
+   Computed: true,
+   },
+   "domain": {
+   Type: 
schema.TypeString,
+   Computed: true,
+   },
+   "domain_id": {
+   Type: 
schema.TypeString,
+   Computed: true,
+   },

Review Comment:
   Can we merge both `domain` & `domainid`?



-- 
This is an automated mess

Re: [PR] Add `cloudstack_limits` data source and resource [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


DaanHoogland commented on code in PR #197:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/197#discussion_r2329766002


##
cloudstack/data_source_cloudstack_limits.go:
##
@@ -0,0 +1,210 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package cloudstack
+
+import (
+   "bytes"
+   "crypto/sha256"
+   "encoding/hex"
+   "fmt"
+
+   "github.com/apache/cloudstack-go/v2/cloudstack"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
+)
+
+func dataSourceCloudStackLimits() *schema.Resource {
+   return &schema.Resource{
+   Read: dataSourceCloudStackLimitsRead,
+   Schema: map[string]*schema.Schema{
+   "type": {
+   Type: schema.TypeString,
+   Optional: true,
+   ValidateFunc: validation.StringInSlice([]string{
+   "instance", "ip", "volume", "snapshot", 
"template", "project", "network", "vpc",
+   "cpu", "memory", "primarystorage", 
"secondarystorage",
+   }, false), // false disables case-insensitive 
matching
+   Description: "The type of resource to list the 
limits. Available types are: " +
+   "instance, ip, volume, snapshot, 
template, project, network, vpc, cpu, memory, " +
+   "primarystorage, secondarystorage",
+   },
+   "account": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List resources by account. Must 
be used with the domain_id parameter.",
+   },
+   "domain_id": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List only resources belonging to 
the domain specified.",
+   },
+   "projectid": {

Review Comment:
   @vishesh92 , isn’t this more consistent with cloudstack itself? I would say 
change the rest ; this is actually the correct semantics (unless there is a 
generic golang or terraform convention I’m not aware of)



-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] chore(deps): bump github.com/hashicorp/terraform-plugin-framework-validators from 0.12.0 to 0.18.0 [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


DaanHoogland commented on PR #183:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/183#issuecomment-3265661048

   @dependabot rebase


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `cloudstack_limits` data source and resource [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


vishesh92 commented on code in PR #197:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/197#discussion_r2329663143


##
cloudstack/resource_cloudstack_limits.go:
##
@@ -0,0 +1,471 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package cloudstack
+
+import (
+   "context"
+   "fmt"
+   "log"
+   "strconv"
+   "strings"
+
+   "github.com/apache/cloudstack-go/v2/cloudstack"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
+)
+
+// resourceTypeMap maps string resource types to their integer values
+var resourceTypeMap = map[string]int{
+   "instance": 0,
+   "ip":   1,
+   "volume":   2,
+   "snapshot": 3,
+   "template": 4,
+   "project":  5,
+   "network":  6,
+   "vpc":  7,
+   "cpu":  8,
+   "memory":   9,
+   "primarystorage":   10,
+   "secondarystorage": 11,
+}
+
+func resourceCloudStackLimits() *schema.Resource {
+   return &schema.Resource{
+   Read:   resourceCloudStackLimitsRead,
+   Update: resourceCloudStackLimitsUpdate,
+   Create: resourceCloudStackLimitsCreate,
+   Delete: resourceCloudStackLimitsDelete,
+   Schema: map[string]*schema.Schema{
+   "type": {
+   Type: schema.TypeString,
+   Required: true,
+   ForceNew: true,
+   ValidateFunc: validation.StringInSlice([]string{
+   "instance", "ip", "volume", "snapshot", 
"template", "project", "network", "vpc",
+   "cpu", "memory", "primarystorage", 
"secondarystorage",
+   }, false), // false disables case-insensitive 
matching
+   Description: "The type of resource to update 
the limits. Available types are: " +
+   "instance, ip, volume, snapshot, 
template, project, network, vpc, cpu, memory, " +
+   "primarystorage, secondarystorage",
+   },
+   "account": {
+   Type:schema.TypeString,
+   Optional:true,
+   ForceNew:true,
+   Description: "Update resource for a specified 
account. Must be used with the domain_id parameter.",
+   },
+   "domain_id": {
+   Type:schema.TypeString,
+   Optional:true,
+   ForceNew:true,
+   Description: "Update resource limits for all 
accounts in specified domain. If used with the account parameter, updates 
resource limits for a specified account in specified domain.",
+   },
+   "max": {
+   Type:schema.TypeInt,
+   Optional:true,
+   Description: "Maximum resource limit. Use -1 
for unlimited resource limit. A value of 0 means zero resources are allowed, 
though the CloudStack API may return -1 for a limit set to 0.",
+   },
+   "configured_max": {
+   Type:schema.TypeInt,
+   Computed:true,
+   Description: "Internal field to track the 
originally configured max value to distinguish between 0 and -1 when CloudStack 
returns -1.",
+   },
+   "projectid": {

Review Comment:
   Can we use `project` here to maintain consistency?



-- 
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: dev-unsubs

Re: [PR] Add `cloudstack_limits` data source and resource [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


vishesh92 commented on code in PR #197:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/197#discussion_r2329651750


##
cloudstack/data_source_cloudstack_limits.go:
##
@@ -0,0 +1,210 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package cloudstack
+
+import (
+   "bytes"
+   "crypto/sha256"
+   "encoding/hex"
+   "fmt"
+
+   "github.com/apache/cloudstack-go/v2/cloudstack"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
+)
+
+func dataSourceCloudStackLimits() *schema.Resource {
+   return &schema.Resource{
+   Read: dataSourceCloudStackLimitsRead,
+   Schema: map[string]*schema.Schema{
+   "type": {
+   Type: schema.TypeString,
+   Optional: true,
+   ValidateFunc: validation.StringInSlice([]string{
+   "instance", "ip", "volume", "snapshot", 
"template", "project", "network", "vpc",
+   "cpu", "memory", "primarystorage", 
"secondarystorage",
+   }, false), // false disables case-insensitive 
matching
+   Description: "The type of resource to list the 
limits. Available types are: " +
+   "instance, ip, volume, snapshot, 
template, project, network, vpc, cpu, memory, " +
+   "primarystorage, secondarystorage",
+   },
+   "account": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List resources by account. Must 
be used with the domain_id parameter.",
+   },
+   "domain_id": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List only resources belonging to 
the domain specified.",
+   },
+   "projectid": {

Review Comment:
   We are using `project` everywhere else in the code.



-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] chore(deps): bump github.com/hashicorp/terraform-plugin-framework from 1.7.0 to 1.15.1 [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


dependabot[bot] commented on PR #199:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/199#issuecomment-3266092459

   OK, I won't notify you again about this release, but will get in touch when 
a new version is available. If you'd rather skip all updates until the next 
major or minor version, let me know by commenting `@dependabot ignore this 
major version` or `@dependabot ignore this minor version`. You can also ignore 
all major, minor, or patch releases for a dependency by adding an [`ignore` 
condition](https://docs.github.com/en/code-security/supply-chain-security/configuration-options-for-dependency-updates#ignore)
 with the desired `update_types` to your config file.
   
   If you change your mind, just re-open this PR and I'll resolve any conflicts 
on it.


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `cloudstack_limits` data source and resource [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


vishesh92 commented on code in PR #197:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/197#discussion_r2329787872


##
cloudstack/data_source_cloudstack_limits.go:
##
@@ -0,0 +1,210 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package cloudstack
+
+import (
+   "bytes"
+   "crypto/sha256"
+   "encoding/hex"
+   "fmt"
+
+   "github.com/apache/cloudstack-go/v2/cloudstack"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
+)
+
+func dataSourceCloudStackLimits() *schema.Resource {
+   return &schema.Resource{
+   Read: dataSourceCloudStackLimitsRead,
+   Schema: map[string]*schema.Schema{
+   "type": {
+   Type: schema.TypeString,
+   Optional: true,
+   ValidateFunc: validation.StringInSlice([]string{
+   "instance", "ip", "volume", "snapshot", 
"template", "project", "network", "vpc",
+   "cpu", "memory", "primarystorage", 
"secondarystorage",
+   }, false), // false disables case-insensitive 
matching
+   Description: "The type of resource to list the 
limits. Available types are: " +
+   "instance, ip, volume, snapshot, 
template, project, network, vpc, cpu, memory, " +
+   "primarystorage, secondarystorage",
+   },
+   "account": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List resources by account. Must 
be used with the domain_id parameter.",
+   },
+   "domain_id": {
+   Type:schema.TypeString,
+   Optional:true,
+   Description: "List only resources belonging to 
the domain specified.",
+   },
+   "projectid": {

Review Comment:
   I mean consistent with the terraform provider code. We are using "project" 
everywhere in terraform resources to specify both project name or id. If the 
name of the project is specified, terraform will fetch the project id and use 
that.



-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] Add `cloudstack_limits` data source and resource [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


DaanHoogland commented on code in PR #197:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/197#discussion_r2329767108


##
cloudstack/resource_cloudstack_limits.go:
##
@@ -0,0 +1,471 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+package cloudstack
+
+import (
+   "context"
+   "fmt"
+   "log"
+   "strconv"
+   "strings"
+
+   "github.com/apache/cloudstack-go/v2/cloudstack"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
+   "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
+)
+
+// resourceTypeMap maps string resource types to their integer values
+var resourceTypeMap = map[string]int{
+   "instance": 0,
+   "ip":   1,
+   "volume":   2,
+   "snapshot": 3,
+   "template": 4,
+   "project":  5,
+   "network":  6,
+   "vpc":  7,
+   "cpu":  8,
+   "memory":   9,
+   "primarystorage":   10,
+   "secondarystorage": 11,
+}
+
+func resourceCloudStackLimits() *schema.Resource {
+   return &schema.Resource{
+   Read:   resourceCloudStackLimitsRead,
+   Update: resourceCloudStackLimitsUpdate,
+   Create: resourceCloudStackLimitsCreate,
+   Delete: resourceCloudStackLimitsDelete,
+   Schema: map[string]*schema.Schema{
+   "type": {
+   Type: schema.TypeString,
+   Required: true,
+   ForceNew: true,
+   ValidateFunc: validation.StringInSlice([]string{
+   "instance", "ip", "volume", "snapshot", 
"template", "project", "network", "vpc",
+   "cpu", "memory", "primarystorage", 
"secondarystorage",
+   }, false), // false disables case-insensitive 
matching
+   Description: "The type of resource to update 
the limits. Available types are: " +
+   "instance, ip, volume, snapshot, 
template, project, network, vpc, cpu, memory, " +
+   "primarystorage, secondarystorage",
+   },
+   "account": {
+   Type:schema.TypeString,
+   Optional:true,
+   ForceNew:true,
+   Description: "Update resource for a specified 
account. Must be used with the domain_id parameter.",
+   },
+   "domain_id": {
+   Type:schema.TypeString,
+   Optional:true,
+   ForceNew:true,
+   Description: "Update resource limits for all 
accounts in specified domain. If used with the account parameter, updates 
resource limits for a specified account in specified domain.",
+   },
+   "max": {
+   Type:schema.TypeInt,
+   Optional:true,
+   Description: "Maximum resource limit. Use -1 
for unlimited resource limit. A value of 0 means zero resources are allowed, 
though the CloudStack API may return -1 for a limit set to 0.",
+   },
+   "configured_max": {
+   Type:schema.TypeInt,
+   Computed:true,
+   Description: "Internal field to track the 
originally configured max value to distinguish between 0 and -1 when CloudStack 
returns -1.",
+   },
+   "projectid": {

Review Comment:
   see 
https://github.com/apache/cloudstack-terraform-provider/pull/197#discussion_r2329766002



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

Re: I want to upgrade 4.20.0 to 4.21.0

2025-09-08 Thread Bernardo De Marco Gonçalves
Hello, Sanjay

First, it is important to highlight that the 4.21.0.0 ACS version,
according to [1], was released with a blocker issue for KVM-based
environments. The issue seems to be occurring for environments with the
physical networks containing the Storage traffic type [2]. Therefore, it is
recommended to first test and validate the 4.21 version in a staging
environment.

As for the upgrade process, when updating ACS to a new major version, it is
required for the system VM template of the new version to be either
included in the new version packages or to be manually registered before
starting the upgrade process. The ACS documentation section [3] contains
instructions to manually register it.

After the registration of the SSVM template is completed, the upgrade
process can be started.

## Management Servers Upgrade

Before upgrading the Management Servers, UI customizations files (such as
logos and banners) located in `/usr/share/cloudstack-management/webapp/`
should be backed up. Next, the following steps can be executed:

1. Ensure there are no running asynchronous jobs by executing the
`listAsyncJobs` API with the parameter `listall=true`
2. Stop the `cloudstack-management` and `cloudstack-usage` services on all
Management Server nodes
3. Dump the `cloud` and `cloud_usage` databases [4]
4. Install the new packages (`cloudstack-management`, `cloudstack-ui`,
`cloudstack-usage` and `cloudstack-common`) only on one Management Server
node
5. Start and monitor the upgrade process in the updated node
6. Validate API and UI access
7. Repeat steps 4 and 5 for the other Management Server nodes

## Agent Upgrade

To update the Agent service in the KVM compute plane hosts, the following
steps can be executed:

1. Stop the `cloudstack-agent` service
2. Install the new packages (`cloudstack-common` and `cloudstack-agent`)
3. Start the `cloudstack-agent` service

## Post Upgrade

After the upgrade is completed, the system VMs should be recreated. To
recreate the CPVM and SSVM, it is simply required to delete the existing
ones, and the Management Server will provision the new ones with the
correct system VM template. For VRs, it is required to clean up VPCs and
isolated and shared networks.

Best regards,
Bernardo De Marco Gonçalves (bernardodemarco)

[1]: https://github.com/apache/cloudstack/issues/11552

[2]:
https://github.com/apache/cloudstack/issues/11552#issuecomment-3250671946

[3]:
https://docs.cloudstack.apache.org/en/latest/upgrading/upgrade/upgrade-4.21.html#update-system-vm-templates

[4]: Dumps can be used to roll back the upgrade if any problems are
encountered during the installation. To roll back, all Management Server
nodes should be stopped. Next, the dumps can be restored and the packages
of the version to be rolled back to can be reinstalled.

Em seg., 8 de set. de 2025 às 07:38, Sanjay Kumar 
escreveu:

> Hell0!
>
> We are planing to upgrade my infra from 4.20 to 4.21 so is there any
> discrepancy during the upgradation? what is proper step to complete my
> upgrade without any issue?
>
> Any help would be really appreciated.
>
> Thank you
>


Re: [PR] added some functionality, see CHANGES.MD for details [cloudstack-terraform-provider]

2025-09-08 Thread via GitHub


jgotteswinter closed pull request #215: added some functionality, see 
CHANGES.MD for details
URL: https://github.com/apache/cloudstack-terraform-provider/pull/215


-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org