Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Test case and make instance storageType to skip diff #259

Merged
merged 2 commits into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/reusable-dev-acc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ on:
required: false
default: 'acc-dev-testcases'
type: string
vmaas_api_url:
description: 'Enter VMaaS API URL '
required: false
default: 'https://iac-vmaas.us1.greenlake-hpe.com'
type: string
vmaas_broker_url:
description: 'Enter VMaas Broker URL'
required: false
default: 'https://vmaas-broker.us1.greenlake-hpe.com'
type: string
secrets:
DEV_HPEGL_IAM_SERVICE_URL:
required: true
Expand All @@ -44,6 +54,8 @@ env:
HPEGL_VMAAS_API_URL: ${{ secrets.DEV_HPEGL_VMAAS_API_URL }}
HPEGL_VMAAS_LOCATION: ${{ secrets.DEV_HPEGL_VMAAS_LOCATION }}
HPEGL_VMAAS_SPACE_NAME: ${{ secrets.DEV_HPEGL_VMAAS_SPACE_NAME}}
HPEGL_VMAAS_API_URL: ${{ inputs.vmaas_api_url }}
HPEGL_VMAAS_BROKER_URL: ${{ inputs.vmaas_broker_url }}
TF_ACC: ${{ secrets.TF_ACC }}
LOG_FILE: "Terraform Log - ${{ inputs.test_description }}.txt"
jobs:
Expand Down
1 change: 1 addition & 0 deletions internal/resources/resource_instances_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ func getInstanceDefaultSchema(isClone bool) *schema.Resource {
Optional: true,
Description: `Storage type ID can be obtained from hpegl_vmaas_instance_disk_type
data source.`,
DiffSuppressFunc: utils.SkipField(),
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed cause
image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The skip diff is needed cause, when a vol is created without providing storage_type then null will be present in main.tf, but upon creating the statefile gets id 1 which is default type. And then when an additional vol is added, then comparing from main.tf and statefile it detects a change in storage_type and throws err

},
"id": {
Computed: true,
Expand Down
Loading