-
Notifications
You must be signed in to change notification settings - Fork 118
fix: Allow onboarding member account in non AppStream supported regions #844
fix: Allow onboarding member account in non AppStream supported regions #844
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #844 +/- ##
===========================================
+ Coverage 50.91% 51.14% +0.22%
===========================================
Files 286 286
Lines 15932 15973 +41
Branches 2483 2492 +9
===========================================
+ Hits 8112 8169 +57
+ Misses 6863 6849 -14
+ Partials 957 955 -2
Continue to review full report at Codecov.
|
@@ -48,6 +54,19 @@ class CfnTemplateService extends Service { | |||
|
|||
async getTemplate(name) { | |||
const entry = _.find(this.store, ['key', name]); | |||
const isAppStreamEnabled = await this.settings.get(settingKeys.isAppStreamEnabled); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use settings.getBoolean
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to use getBoolean
const doc = yamlParse(entry.value); | ||
delete doc.Resources.AppStreamFleet; | ||
delete doc.Resources.AppStreamStack; | ||
delete doc.Resources.AppStreamStackFleetAssociation; | ||
delete doc.Outputs.AppStreamFleet; | ||
delete doc.Outputs.AppStreamStack; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than deleting specific Resources was it possible to remove the ones where we have condition as isAppStream
? That way any future changes to that template (if any) would be accounted for
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to remove all resources/outputs with isAppStream
or isAppStreamAndCustomDomain
condition.
Issue #, if available:
Description of changes:
If you wanted to deploy SWB with AppStream disabled in a non AppStream supported region, you were unable to do so. You will encounter this error in CloudFormation
Template format error: Unrecognized resource types: [AWS::AppStream::StackFleetAssociation, AWS::AppStream::Stack, AWS::AppStream::Fleet]
This code change allows SWB to be deployed in all regions by removing those AppStream specific resources. The resources will be only removed if AppStream is disabled.
Testing: SWB was able to onboard member accounts in both AppStream supported and non supported regions. The upgrade process from an old
onboard-account
template to the current template was also tested. The upgrade process was smooth. There was no conflicts when using the SWB UI to upgrade the member account.Checklist:
AS review ticket id:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.