-
Notifications
You must be signed in to change notification settings - Fork 84
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
Tag Model not portable between Services #53
Comments
Hello, |
+1 to treating various services' .Tags attribute as a hash table. It should not be this hard to extract an instance's Name tag: |
The more work I do with the module, the more painful this becomes. I would love if the tags could be treated as a hash table both on responses and as inputs on cmdlets. |
Just to give another example to demonstrate the pain this causes. In this example, I query for all secrets that have a I must iterate over all secrets, and then iterate over each tag in order to identify the tag in question, retrieve the value, and do the compare: $assetSecrets = Get-SECSecretList -Filter @(
@{Key = 'tag-key'; Values = 'system' },
@{Key = 'tag-value'; Values = 'CONTOSO' }
)
$assetSecrets | Where-Object {($_.Tags | Where-Object($_.Key -eq 'environment') | Select-Object -ExpandProperty 'value') -eq 'PRODUCTION'} I would rather just specify the following: $assetSecrets | Where-Object {$_.Tags['environment'] -eq 'PRODUCTION'} |
We have noticed this issue has not received attention in 1 year. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue. |
This would still be incredibly useful to have |
The model classes in SDK are autogenerated and strongly types objects cannot be used from one model to other. May be |
Explicit *.Tag types should be portable between services.
Expected Behavior
I would like to be able to re-use an object of type
[Amazon.EC2.Model.Tag]
when tagging within theElasticLoadBalancingV2
service.Current Behavior
ELB2 rejects strongly typed EC2 tags and disallows allow explicit casting from
[Amazon.EC2.Model.Tag]
to[Amazon.ElasticLoadBalancingV2.Model.Tag]
Steps to Reproduce (for bugs)
Possible Solution
As a workaround, currently you can strip the typing from the tag and convert it to a generic hash (optionally re-casting to the Tag type of your target service if needed)
Context
I was extracting tags from a TagSpecification object used for deploying EC2 instances into an ELB2 tag array so that I could have common tags on the load balancer infrastructure as on the EC2 hosts.
As a point of interest, it appears that tag types are silo'd between other services not named here as well.
Your Environment
The text was updated successfully, but these errors were encountered: