-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
resource account: allow setting NoStackInheritance
You can now set NoStackInheritance: true for an account. This will make it so that a stack doesn't inherit from the current OU or parent OUs. The most useful case for this is when you have the management account at the top level and want to declare top level stacks as well to target all sub accounts except the management account.
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,19 @@ var ( | |
AccountName: "Example2", | ||
AccountID: "2", | ||
}, | ||
{ | ||
Email: "[email protected]", | ||
AccountName: "mgmt-account", | ||
AccountID: "3", | ||
NoStackInheritance: true, | ||
BaselineStacks: []resource.Stack{ | ||
{ | ||
Name: "mgmt-stack", | ||
Type: "Terraform", | ||
Path: "tf/mgmt", | ||
}, | ||
}, | ||
}, | ||
}, | ||
ChildOUs: []*resource.OrganizationUnit{ | ||
{ | ||
|
@@ -163,6 +176,17 @@ func TestAllBaselineStacks(t *testing.T) { | |
}, | ||
}, | ||
}, | ||
{ | ||
rootOU: rootOU, | ||
targetAccountEmail: "[email protected]", | ||
wantStacks: []resource.Stack{ | ||
{ | ||
Name: "mgmt-stack", | ||
Type: "Terraform", | ||
Path: "tf/mgmt", | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
for _, tc := range tests { | ||
|