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 a policy to copy Ec2 instance tags to its attached EBSvolumes.
The policy works fine, but I need to skip if tags already exist with the EBS
Ex: EC2 contained
- Technical:ApplicationID
- Technical:Environment
- Technical:PlatformOwner
- Technical:ApplicationName
- Name
if Volume doesnt have any of these tags it will copy from ec2 to ebs (fine)
Let's assume EBS has already
- Technical:ApplicationName
- Name
then I need to keep EBS Name and Technical:ApplicationName tags, only copy missing tags to EBS from EC2.
Is there any workaround we can do to achieve this, I am new to the custodian and could not find any related documentation for this.
Extra information or context
This policy actually replaces the pre-exist tags on EBS.
name: ec2-copy-tags-to-ebs
resource: ebs
description: |
Tag EBS with the attached EC2 Tags
mode:
type: periodic
schedule: "rate(1 day)"
role: *custodian-iam-role (# already defined as Vars)
filters:
type: value
key: "Attachments[0].Device"
value: not-null
actions:
type: copy-instance-tags
tags:
Technical:ApplicationID
Technical:Environment
Technical:PlatformOwner
Technical:ApplicationName
Name
The text was updated successfully, but these errors were encountered:
Describe the feature
We have a policy to copy Ec2 instance tags to its attached EBSvolumes.
The policy works fine, but I need to skip if tags already exist with the EBS
Ex: EC2 contained
- Technical:ApplicationID
- Technical:Environment
- Technical:PlatformOwner
- Technical:ApplicationName
- Name
if Volume doesnt have any of these tags it will copy from ec2 to ebs (fine)
Let's assume EBS has already
- Technical:ApplicationName
- Name
then I need to keep EBS Name and Technical:ApplicationName tags, only copy missing tags to EBS from EC2.
Is there any workaround we can do to achieve this, I am new to the custodian and could not find any related documentation for this.
Extra information or context
This policy actually replaces the pre-exist tags on EBS.
resource: ebs
description: |
Tag EBS with the attached EC2 Tags
mode:
type: periodic
schedule: "rate(1 day)"
role: *custodian-iam-role (# already defined as Vars)
filters:
key: "Attachments[0].Device"
value: not-null
actions:
tags:
The text was updated successfully, but these errors were encountered: