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

[IT-4287] Automate SSM patching for all instances in all accounts #1334

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

DefaultOrganizationBinding:
Account: !Ref accountId
Parameters:
TargetOrgUnits: !Ref PlatformOU
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zaro0508 can I !Ref the OU here like this?

Copy link
Contributor

@zaro0508 zaro0508 Feb 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To answer your question, I'm not sure this example seems to indicate that it's possible however i'm not sure if it's only possible in context of an OrganizationBindings.

if it doesn't work you might want to think about converting the cloudformation template to a nunjucks template so that you can list each OU or account here.

Also I'm wondering if * works for this parameter?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately * isn't valid, but we can specify the organization root to target all accounts in the organization. I'll try doing it with a !Ref, but I might have to hard-code the value

Comment on lines 4 to 11
TargetOrgUnits:
Type: String
Description: >-
Comma separated list of AWS Organizational Units to target.
TargetRegions:
Type: String
Description: >-
Comma separated list of AWS Organizational Units to target.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's probably better to change these to CommaDelimitedList types

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that's appropriate, that would unpack the input into a list of strings, but the parameters these are being passed to expect a comma-delimited string, not a list of strings, so I'm pretty sure I would have to repack the values into a single string with !Join if this were a CommaDelimitedList

org-formation/090-systems-manager/_tasks.yaml Show resolved Hide resolved
DefaultOrganizationBinding:
Account: !Ref accountId
Parameters:
TargetOrgUnits: !Ref PlatformOU
Copy link
Contributor

@zaro0508 zaro0508 Feb 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To answer your question, I'm not sure this example seems to indicate that it's possible however i'm not sure if it's only possible in context of an OrganizationBindings.

if it doesn't work you might want to think about converting the cloudformation template to a nunjucks template so that you can list each OU or account here.

Also I'm wondering if * works for this parameter?

@ConsoleCatzirl ConsoleCatzirl changed the title [IT-3940] Automate SSM patching for all instances in Platform accounts [IT-3940] Automate SSM patching for all instances in all accounts Feb 11, 2025
@ConsoleCatzirl ConsoleCatzirl marked this pull request as ready for review February 11, 2025 21:00
@ConsoleCatzirl ConsoleCatzirl requested a review from a team as a code owner February 11, 2025 21:00
@ConsoleCatzirl ConsoleCatzirl changed the title [IT-3940] Automate SSM patching for all instances in all accounts [IT-4287] Automate SSM patching for all instances in all accounts Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants