-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.AWSOrganized
44 lines (30 loc) · 1.81 KB
/
Makefile.AWSOrganized
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
.PHONY: import-organization make-migrations migrate clean
CICD_ACCOUNT_ID="156551640785"
ORG_MANAGEMENT_ACCOUNT_ID=156551640785
IMPORT_ROLE_ARN="arn:aws:iam::$(ORG_MANAGEMENT_ACCOUNT_ID):role/AWSOrganized/ImportOrganizationRole"
MAKE_MIGRATIONS_ROLE_ARN = "arn:aws:iam::$(ORG_MANAGEMENT_ACCOUNT_ID):role/AWSOrganized/MakeMigrationsRole"
MIGRATE_ROLE_ARN = "arn:aws:iam::$(ORG_MANAGEMENT_ACCOUNT_ID):role/AWSOrganized/MigrateRole"
import-organization:
poetry run aws-organized import-organization $(IMPORT_ROLE_ARN)
generate-import-organization-role-template:
poetry run aws-organized generate-import-organization-role-template $$(aws sts get-caller-identity --query Account --output text)
provision-import-organization-role-stack:
poetry run aws-organized provision-import-organization-role-stack $(CICD_ACCOUNT_ID)
make-migrations:
poetry run aws-organized make-migrations $(MAKE_MIGRATIONS_ROLE_ARN)
generate-make-migrations-role-template:
poetry run aws-organized generate-make-migrations-role-template $$(aws sts get-caller-identity --query Account --output text)
provision-make-migrations-role-stack:
poetry run aws-organized provision-make-migrations-role-stack $(CICD_ACCOUNT_ID)
migrate:
poetry run aws-organized migrate $(MIGRATE_ROLE_ARN)
generate-migrate-role-template:
poetry run aws-organized generate-migrate-role-template $$(aws sts get-caller-identity --query Account --output text)
provision-migrate-role-stack:
poetry run aws-organized provision-migrate-role-stack $(CICD_ACCOUNT_ID)
generate-codepipeline-template:
poetry run aws-organized generate-codepipeline-template $(MIGRATE_ROLE_ARN)
provision-codepipeline-stack:
poetry run aws-organized provision-codepipeline-stack $(MIGRATE_ROLE_ARN)