-
Notifications
You must be signed in to change notification settings - Fork 114
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
Improvement to create images using 'data_source_reference' #156
base: master
Are you sure you want to change the base?
Improvement to create images using 'data_source_reference' #156
Conversation
saratkumar-yb
commented
Jul 6, 2020
- Improvement to create images using 'data_source_reference'
@kumarsarath588 can you add a test case and website documentation for this feature? |
@kumarsarath588 Can you rebase your PR with master and change the type from map to list with max items as 1 as Maps doesn't support inner nested schema ? Another option could be to use just TypeMap with |
if iok && pok { | ||
return diag.Errorf("both source_uri and source_path provided") | ||
// if three path, uri, dsr are provided, return an error | ||
if iok && pok && dsr { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if only two values are provided ?
Then also we should raise error.
Type: schema.TypeList, | ||
MaxItems: 1, | ||
Optional: true, | ||
Computed: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the field is marked as "Computed" then we should ideally read its value in resourceNutanixImageRead().
It calls out to https://www.nutanix.dev/api_references/prism-central-v3/#/b3A6MjU1ODc1MTE-get-a-existing-image API.
We can set this value in read function as well.