1 Answer
- Newest
- Most votes
- Most comments
0
It sounds like the tag policy you have defined is not working as expected. Here are a few things to check:
Make sure that the tag policy is enabled. You can do this by navigating to the Tag policies page in the AWS Management Console and verifying that the policy is enabled.
Verify that the policy is applied to the correct resources. Tag policies only apply to resources that are created or modified after the policy is enabled.
Check the syntax of the policy. The policy you provided looks correct, but it's possible that there is a syntax error or typo that is causing the policy to fail.
Regarding your second question, you can modify the policy to use a wildcard to ensure that the InfraOwner tag value always ends with "@gmail.com". Here's an example policy that does this:
{
"tags": {
"InfraOwner": {
"tag_key": {
"@@assign": "InfraOwner"
},
"tag_value": {
"@@endsWith": "@gmail.com"
}
}
}
}
-
This policy uses the "@@endsWith" condition operator to ensure that the InfraOwner tag value ends with "@gmail.com".
-
Note that this policy will only allow values that end with "@gmail.com", so if you want to allow other email domains as well, you will need to modify the policy accordingly.
if this answer helps, please ensure to leave a thumbs up.
I hope this helps! Let me know if you have any further questions.
answered a year ago
Relevant content
- asked a year ago
- asked 10 months ago
- asked a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 years ago