You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have an issue where retrieving a cp code via the data source provides the wrong one/id when there are 2 or more cp codes with the same name.
Replication steps:
Create a property in your group (should be a child group under contract level group)
Create a cp code that will be associated to the property (name ie test)
Activate the property
Create a NetStorage group + upload directory (storage group name, domain prefix, and cp code name should be the same as the property's cp code, ie. test)
Update the property's behavior via terraform to have an origin type of net storage (retrieving the cp id to define the behavior via cp code data source using the common name)
Assumption: Issue seems to be that the cp code data source returns the first matching instance of a cp code given a provided name, even if there's multiple matches
Issue: Performing step 5, the property type cp code id is retrieved instead of the net storage type cp code, since they both have the same name (which is discovered via UI errors, preventing an activation due to incorrect cp code id)
Potential solution(s):
Have the data source return all matching codes (a list return instead of single)
Incorporate product id in parameter to extract the appropriate cp code by type
The text was updated successfully, but these errors were encountered:
Thanks for reporting it. I was able to reproduce this behaviour.
As an alternative to the cpcodeName you can fetch cp code datasource by cpcodeId and this way be sure that you are using correct cp code.
Does this approach solve your problem?
I will make sure that our documentation will be updated with this information.
BR,
Konrad
KonradRajda
changed the title
Cp Code Data Source Functionality Bug
DXISSUE-3100 Cp Code Data Source Functionality Bug
Jan 23, 2025
We have an issue where retrieving a cp code via the data source provides the wrong one/id when there are 2 or more cp codes with the same name.
Replication steps:
Assumption: Issue seems to be that the cp code data source returns the first matching instance of a cp code given a provided name, even if there's multiple matches
Issue: Performing step 5, the property type cp code id is retrieved instead of the net storage type cp code, since they both have the same name (which is discovered via UI errors, preventing an activation due to incorrect cp code id)
Potential solution(s):
The text was updated successfully, but these errors were encountered: