Re: [PR] Update SDKs [cloudstack-terraform-provider]

2024-04-26 Thread via GitHub


CodeBleu commented on code in PR #71:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/71#discussion_r1581168828


##
.github/workflows/acceptance.yml:
##
@@ -73,18 +81,35 @@ jobs:
   - name: Create extra resources
 run: |
   cmk -u $CLOUDSTACK_API_URL -k $CLOUDSTACK_API_KEY -s 
$CLOUDSTACK_SECRET_KEY -o json create project name=terraform 
displaytext=terraform
+  - uses: hashicorp/setup-terraform@v2
+with:
+  terraform_version: ${{ matrix.terraform-version }}
+  terraform_wrapper: false
   - name: Run acceptance test
 run: |
   make testacc
 services:
   cloudstack-simulator:
-image: apache/cloudstack-simulator:${{ matrix.cloudstack_version }}
+image: apache/cloudstack-simulator:${{ matrix.cloudstack-version }}
 ports:
   - 8080:5050
 strategy:
   fail-fast: false
   matrix:
-cloudstack_version:
+terraform-version:
+  - '0.12.*'
+  - '0.13.*'
+  - '0.14.*'
+  - '0.15.*'
+  - '1.0.*'
+  - '1.1.*'
+  - '1.2.*'
+  - '1.3.*'
+  - '1.4.*'
+  - '1.5.*'
+  - '1.6.*'
+  - '1.7.*'

Review Comment:
   @fabiomatavelli what about Tofu versions?



-- 
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: [I] Inconsistent result when creating cloudstack_firewall [cloudstack-terraform-provider]

2024-04-26 Thread via GitHub


mwaag commented on issue #115:
URL: 
https://github.com/apache/cloudstack-terraform-provider/issues/115#issuecomment-2079248153

   My colleague just found this: 
https://www.reddit.com/r/Terraform/comments/m5nv14/comment/gr29zct/?utm_source=share_medium=web2x=3
   
   Using the argument 'managed = true' workaround my problem, but it seems it 
would be cleaner when the problem is catched from the provider. What do you 
think?


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



[I] Inconsistent result when creating cloudstack_firewall [cloudstack-terraform-provider]

2024-04-26 Thread via GitHub


mwaag opened a new issue, #115:
URL: https://github.com/apache/cloudstack-terraform-provider/issues/115

   Hi,
   this is my first try to open an issue here, please bear with me, if this is 
not the correct way. I will thankfully accept any hints to optimize it in the 
future. I will try to orientate to the issue-template from the 
cloudstack-project.
   I may repeat this with different tf-versions / os'es. Let me know, if you 
need more information.
   
   # PROVIDER INFORMATION
   * Versoin: 0.5.0
   
   # TERRAFORM INFORMATION
   * Versoin: 1.8.2
   
   # HYPERVISOR INFORMATION
   * Hypervisor: VMWare ESXi
   * Version: 7.0.3
   
   # CLOUDSTACK VERSION
   * 4.17.2.0
   
   # CONFIGURATION
   ```
   main.tf:
   terraform {
 required_providers {
   cloudstack = {
   source = "cloudstack/cloudstack"
   version = "0.5.0"
   }
 }
   }
   
   provider "cloudstack" {
 # Configuration Options
 api_url= "${var.cloudstack_api_url}"
 api_key= "${var.cloudstack_api_key}"
 secret_key = "${var.cloudstack_secret_key}"
   }
   
   resource "cloudstack_template" "ubuntu2204" {
 name = "Ubuntu 22.04"
 format = "OVA"
 hypervisor = "VMware"
 os_type = "Other Linux (64-bit)"
 url = "${var.cloudstack_template_url}"
 zone = "Enterprise"
 project = "mwatest01"
 is_dynamically_scalable = true
 is_extractable = false
 is_featured = false
 is_public = true
 password_enabled = false
 is_ready_timeout = 600
 
   }
   
   resource "cloudstack_network" "snw-demo" {
   name= "demo-network"
   display_text= "demo-network"
   cidr= "172.16.0.0/24"
   network_offering= 
"DefaultIsolatedNetworkOfferingWithSourceNatService"
   zone= "Enterprise"
   project = "mwatest01"
   source_nat_ip = true
 
   }
   
   # resource "cloudstack_ipaddress" "default-ip0" {
   #   network_id = cloudstack_network.snw-demo.id
   #   zone = "Enterprise"
   #   project = "mwatest01"
   #   
   # }
   
   resource "cloudstack_instance" "instance-demo" {
   name = "vm-demo"
   display_name = "vm-demo"
   service_offering = "XS Instanz"
   template = cloudstack_template.ubuntu2204.id
   project = "mwatest01"
   zone = "Enterprise"
   start_vm = true
   expunge = true
   network_id = cloudstack_network.snw-demo.id
 
   }
   
   resource "cloudstack_firewall" "default" {
 ip_address_id = cloudstack_network.snw-demo.source_nat_ip_id
   
 rule {
   cidr_list = ["172.26.251.57/32"]
   protocol = "tcp"
   ports = ["22"]
 }
   }
   
   ```
   
   # OS / ENVIRONMENT
   * OS: Ubuntu 22.04.3 LTS on Windows Subsystem for Linux (WSL 2) on Windows 
11 (64-bit) 
   
   # SUMMARY
   ```
   Error: Provider produced inconsistent result after apply
   ```
   when trying to deploy a firewall-rule to a simple isolated guest-network via 
cloudstack-provider.
   # DETAILS
   * We utilize projects for client-isolation
   * Service-offering for vm is a custom one
   * Result is reproducable with newly assigned non-snat-ip-adress (see 
resource cloudstack_ipadress)
   
   
   # STEPS TO REPRODUCE
   
   * create main.tf with contents mentioned above
   * run terraform apply
   
   # EXPECTED RESULTS
   * Rule will be created successfully
   * Rule will be included in terraform state
   
   # ACTUAL RESULTS
   * Rule is created successfully
   * Rule is **not** included in terraform state (Rerun will try to create a 
new rule)
   
   * Full Output:
   ```
   terraform apply
   
   Terraform used the selected providers to generate the following execution 
plan. Resource actions are indicated with the following symbols:
 + create
   
   Terraform will perform the following actions:
   
 # cloudstack_firewall.default will be created
 + resource "cloudstack_firewall" "default" {
 + id= (known after apply)
 + ip_address_id = (known after apply)
 + managed   = false
 + parallelism   = 2
   
 + rule {
 + cidr_list = [
 + "172.26.251.57/32",
   ]
 + icmp_code = (known after apply)
 + icmp_type = (known after apply)
 + ports = [
 + "22",
   ]
 + protocol  = "tcp"
 + uuids = (known after apply)
   }
   }
   
 # cloudstack_instance.instance-demo will be created
 + resource "cloudstack_instance" "instance-demo" {
 + display_name = "vm-demo"
 + expunge  = true
 + group= (known after apply)
 + id   = (known after apply)
 + ip_address   = (known after apply)
 + name = "vm-demo"
 + network_id   = (known after apply)
 + project  = 

Re: [PR] List virtual machines with details=min,nics [cloudstack-kubernetes-provider]

2024-04-26 Thread via GitHub


weizhouapache commented on PR #60:
URL: 
https://github.com/apache/cloudstack-kubernetes-provider/pull/60#issuecomment-2078887527

   did a quick testing, it looks ok
   
   the API command is
   `
   2024-04-26T08:20:25,740 DEBUG [c.c.a.ApiServlet] 
(qtp1375394559-21:[ctx-8dc8b523]) (logid:10e8a469) ===START===  10.0.53.169 -- 
GET  
apiKey=FbdMHXgGot3JuiEmoldLwOo3ZWh4fGjSDTsLz5qXDZn05Q7CSh4ZXSFVJfNYUwWct5YBwHlLZKFVLR-NFKnLkw=listVirtualMachines=min%2Cnics=true=json=K3US18HTxZvG2pJ29nnP8N3PYRg%3D`
   
   
the parameter ` (details=min%2Cnics)` is set as expected


-- 
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] [StepSecurity] ci: Harden GitHub Actions [cloudstack-cloudmonkey]

2024-04-26 Thread via GitHub


DaanHoogland merged PR #146:
URL: https://github.com/apache/cloudstack-cloudmonkey/pull/146


-- 
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] Bump golang.org/x/crypto from 0.1.0 to 0.17.0 [cloudstack-kubernetes-provider]

2024-04-26 Thread via GitHub


DaanHoogland commented on PR #55:
URL: 
https://github.com/apache/cloudstack-kubernetes-provider/pull/55#issuecomment-2078840250

   shall we merge this @rohityadavcloud  @vishesh92 


-- 
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] Update SDKs [cloudstack-terraform-provider]

2024-04-26 Thread via GitHub


rohityadavcloud commented on PR #71:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/71#issuecomment-2078833695

   Thanks @fabiomatavelli tests kicked, let's see what Github actions do.


-- 
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] Update SDKs [cloudstack-terraform-provider]

2024-04-26 Thread via GitHub


fabiomatavelli commented on PR #71:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/71#issuecomment-2078807528

   Done @rohityadavcloud 


-- 
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] Update SDKs [cloudstack-terraform-provider]

2024-04-26 Thread via GitHub


fabiomatavelli commented on code in PR #71:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/71#discussion_r1580587876


##
.github/workflows/acceptance.yml:
##
@@ -73,18 +81,35 @@ jobs:
   - name: Create extra resources
 run: |
   cmk -u $CLOUDSTACK_API_URL -k $CLOUDSTACK_API_KEY -s 
$CLOUDSTACK_SECRET_KEY -o json create project name=terraform 
displaytext=terraform
+  - uses: hashicorp/setup-terraform@v2
+with:
+  terraform_version: ${{ matrix.terraform-version }}
+  terraform_wrapper: false
   - name: Run acceptance test
 run: |
   make testacc
 services:
   cloudstack-simulator:
-image: apache/cloudstack-simulator:${{ matrix.cloudstack_version }}
+image: apache/cloudstack-simulator:${{ matrix.cloudstack-version }}
 ports:
   - 8080:5050
 strategy:
   fail-fast: false
   matrix:
-cloudstack_version:
+terraform-version:
+  - '0.12.*'
+  - '0.13.*'
+  - '0.14.*'
+  - '0.15.*'
+  - '1.0.*'
+  - '1.1.*'
+  - '1.2.*'
+  - '1.3.*'
+  - '1.4.*'
+  - '1.5.*'
+  - '1.6.*'
+  - '1.7.*'

Review Comment:
   Ok, I've removed the `<= 1.6` versions of Terraform then, based on 
https://endoflife.date/terraform.



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