diff --git a/.github/workflows/acceptance-tests.yaml b/.github/workflows/acceptance-tests.yaml index 28f578254..f6a847c9d 100644 --- a/.github/workflows/acceptance-tests.yaml +++ b/.github/workflows/acceptance-tests.yaml @@ -30,7 +30,7 @@ jobs: uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 with: ref: 'main' - + - name: Write the SSH key and create session folders run: | echo "${{ secrets.SSH_PRIVATE_KEY }}" > ./ssh_private_key @@ -61,7 +61,7 @@ jobs: uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 with: go-version-file: '.go-version' - + - name: Set up Node uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0 with: @@ -73,13 +73,13 @@ jobs: - name: Go mod verify run: go mod verify - + - name: Run acceptance tests continue-on-error: true run: | set -euo pipefail TF_ACC=1 go test -json -v ./... -timeout 360m 2>&1 | tee /tmp/gotest.log | gotestfmt - + - name: Get today's date run: echo "TODAY_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index dee4a4aea..f0846843a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,5 +1,6 @@ name: CodeQL -'on': + +on: push: branches: - main @@ -8,6 +9,7 @@ name: CodeQL - main schedule: - cron: 00 00 * * 00 + jobs: analyze: name: Analyze diff --git a/.github/workflows/issue_greeting.yml b/.github/workflows/issue_greeting.yml index 541fea7b9..e556a1fa2 100644 --- a/.github/workflows/issue_greeting.yml +++ b/.github/workflows/issue_greeting.yml @@ -1,9 +1,10 @@ ---- name: Issue Greeting -'on': + +on: issues: types: - opened + jobs: greeting: name: Send Greeting diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index f83b89a4a..8a5d70cf0 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -1,4 +1,4 @@ -name: 'Lock Threads' +name: Lock Threads on: schedule: @@ -18,4 +18,4 @@ jobs: pr-comment: > I'm going to lock this pull request because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. - pr-inactive-days: '30' \ No newline at end of file + pr-inactive-days: '30' diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 673a55df2..4ebecf1ca 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -1,5 +1,4 @@ --- -name: "Pull Request Labels" +name: Pull Request Labels on: pull_request_target: diff --git a/.github/workflows/remove-issue-label.yml b/.github/workflows/remove-issue-label.yml index 1f195a605..672379436 100644 --- a/.github/workflows/remove-issue-label.yml +++ b/.github/workflows/remove-issue-label.yml @@ -1,4 +1,4 @@ -name: Remove specified label from issue +name: Remove Labels on: # This file is reused, and called from other workflows @@ -8,7 +8,6 @@ on: required: true type: string - jobs: remove-label: runs-on: ubuntu-latest @@ -20,22 +19,22 @@ jobs: script: | const { REMOVE_LABEL } = process.env console.log(`Attempting to remove label "${REMOVE_LABEL}"`) - + const { data } = await github.rest.issues.listLabelsOnIssue({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, }) - + // Return early if there are no labels if (data.length == 0){ console.log(`Issue has no labels; not attempting to remove label "${REMOVE_LABEL}"`) return } - + // Check if REMOVE_LABEL is present const filteredData = data.filter(label => label.name == REMOVE_LABEL) - + // Return early if filtering didn't identify the label as present if (filteredData.length == 0){ console.log(`Label "${REMOVE_LABEL}" not found on issue; not attempting to remove it.`) @@ -49,4 +48,4 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, name: REMOVE_LABEL - }) \ No newline at end of file + }) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index fdd1a69c3..5b057e118 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,8 +1,10 @@ --- name: Manage Stale Items -'on': + +on: schedule: - cron: 00 00 * * * + jobs: stale: runs-on: ubuntu-latest @@ -34,7 +36,7 @@ jobs: stale-pr-message: > Marking this pull request as stale due to inactivity in the past 180 days. This helps us focus on the active pull requests. If this - pull request receives no comments in the next 30 days it will + pull request receives no comments in the next 30 days it will automatically be closed. If this pull request was automatically closed and you feel this diff --git a/.github/workflows/unit_tests.yaml b/.github/workflows/unit_tests.yaml index 6ee6079ce..d91c45d8a 100644 --- a/.github/workflows/unit_tests.yaml +++ b/.github/workflows/unit_tests.yaml @@ -1,4 +1,4 @@ -name: Unit tests +name: Unit Tests on: push: @@ -9,6 +9,7 @@ on: - main paths: - '**.go' + jobs: unit_tests: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index a367c44bd..4cee156af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ # +## 2.7.0 (Unreleased) + +BUG FIXES: + +* `resource/virtual_machine`: Fixes support for SR-IOV passthrough virtual machine network adapters. ([#2133](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2133)) +* `resource/virtual_machine`: Unifies `disk.keep_on_remove` with default and `disk.label` with the correct one assigned to the virtual machine disk during import. If the datastore for a virtual machine is part of a datastore cluster the `datastore_cluster_id` attribute is filled during import. ([#2127](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2127)) +* `resource/virtual_machine`: Changed the default value for `sync_time_with_host` in `r/vsphere_virtual_machine` to `true` to align with default value provided by the UI. ([#2120](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2120)) +* `resource/virtual_machine`: Added the virtual machine folder in the search for virtual machine criteria when deploying from an OVF/OVA. scenario. Allows virtual machines with same names in different virtual machine folders to be not distinguished as different managed entities. ([#2118](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2118)) +* `resource/virtual_disk`: Fixes import to use the correct the `vmdk_path`. ([#1762](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1762)) + +FEATURES: + +* `resource/virtual_machine`: Adds support for `memory_reservation_locked_to_max` property. If set true, memory resource reservation for the virtual machine will always be equal to the virtual machine's memory size. ([#2093](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2093)) +* `data/vsphere_host_vgpu_profile`: Adds data source to the provider to query and return available vGPU profiles for an ESXi host. ([#2048](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2048)) +* `data/vsphere_datastore_stats`: Adds datastore stats to report total capacity and free space of datastores. ([#1896](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1896)) +* `data/vsphere_datastore`: Adds stats to report total capacity and free space of a single datastore. ([#1896](https://github.com/terraform-providers/terraform-provider-vsphere/pull/1896)) + +DOCUMENTATION: + +* Updates `INSTALL.md` use use `unzip` for Linux and macOS examples. ([#2105](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2105)) + +CHORES: + +* `provider`: Updates `vmware/govmomi` to v0.35.0. ([#2132](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2132)) +* `provider`: Updates `hashicorp/terraform-plugin-sdk` to v2.32.0. ([#2125](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2125)) +* `provider`: Updates `golang/go` to v1.22.0 ([#2139](https://github.com/terraform-providers/terraform-provider-vsphere/pull/2139)) + ## 2.6.1 (December 11, 2023) BUG FIXES: