Skip to content
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

Tagging Policy bug when deployment target is account #457

Open
5 of 6 tasks
teddevaal opened this issue May 21, 2024 · 0 comments
Open
5 of 6 tasks

Tagging Policy bug when deployment target is account #457

teddevaal opened this issue May 21, 2024 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@teddevaal
Copy link

teddevaal commented May 21, 2024

Describe the bug
Creating Tag Policies only works if the deployment target is a OU, does not work if a deployment target is a specific Account.

To Reproduce
organization-config.yaml

taggingPolicies:
  - name: business-tag-policy-child
    description: Business Tagging Policy for specific workloads
    policy: tagging-policies/business-tag-policy-child.json
    deploymentTargets:
      accounts:
        - target-account

Expected behavior
I expect a Tag policy to be attached to an account directly:
Screenshot 2024-05-21 at 12 17 51 PM

When using the cli, the following command results in the expected behaviour:

aws organizations attach-policy --policy-id p-tag-policy-id --target-id AWS_ACCOUNT
aws organizations list-policies-for-target --filter TAG_POLICY --target-id AWS_ACCOUNT
{
    "Policies": [
        {
            "Id": "p-tag-policy-id",
            "Arn": "arn:aws:organizations::AWS_ACCOUNT:policy/policy-id/tag_policy/p-tag-policy-id",
            "Name": "business-tag-policy-child",
            "Description": "Business Tagging Policy for specific workloads",
            "Type": "TAG_POLICY",
            "AwsManaged": false
        }
    ]
}

Please complete the following information about the solution:

  • Version: 1.6.1 [e.g. v1.5.1]

To get the version of the solution, you can look at the description of the created AWS CloudFormation stack used to install the LZA (AWSAccelerator-InstallerStack). For example, "(SO0199) Landing Zone Accelerator on AWS. Version 1.5.1.". If the description does not contain the version information, you can look at the Parameters of the stack for the RepositoryBranchName as that should contain the version number.

  • Region: ap-southeast-2 [e.g. us-east-1]
  • Was the solution modified from the version published on this repository? No
  • If the answer to the previous question was yes, are the changes available on GitHub?
  • Have you checked your service quotas for the services this solution uses? Yes
  • Were there any errors in the CloudWatch Logs? No

Screenshots
If applicable, add screenshots to help explain your problem (please DO NOT include sensitive information).

Additional context
Source code confirms that this functionality has only been implemented for Organization Units:
https://github.com/awslabs/landing-zone-accelerator-on-aws/blob/main/source/packages/%40aws-accelerator/accelerator/lib/stacks/organizations-stack.ts#L648-L693

@teddevaal teddevaal added the bug Something isn't working label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

2 participants