Skip to content

Commit

Permalink
initial creation of automation for module 2 with Refactor Spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
deki committed Mar 22, 2022
1 parent 8d725ed commit 16deb78
Showing 1 changed file with 53 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
AWSTemplateFormatVersion: 2010-09-09
Description: AWS Migration Hub Refactor Spaces foundation stack for the Application Modernization Workshop/ Immersion Day

Parameters:
UniShopVpcId:
Type: AWS::SSM::Parameter::Value<String>
Default: UniShopVpcId

UniShopBackendDnsName:
Type: AWS::SSM::Parameter::Value<String>
Default: UniShopPublicDnsName

Resources:
UniShopRefactorSpacesModernizationEnvironment:
Type: AWS::RefactorSpaces::Environment
Properties:
Name: unistore-dev
NetworkFabricType: TRANSIT_GATEWAY
Description: A Refactor Spaces environment for the Unicorn store

UniShopRefactorSpacesApplication:
Type: AWS::RefactorSpaces::Application
Properties:
Name: unistore
EnvironmentIdentifier: !Ref UniShopRefactorSpacesModernizationEnvironment
VpcId: !Ref UniShopVpcId
ProxyType: API_GATEWAY
ApiGatewayProxy:
EndpointType: REGIONAL

UniShopLegacyService:
Type: AWS::RefactorSpaces::Service
Properties:
Name: legacy
EnvironmentIdentifier: !Ref UniShopRefactorSpacesModernizationEnvironment
ApplicationIdentifier: !GetAtt UniShopRefactorSpacesApplication.ApplicationIdentifier
EndpointType: URL
VpcId: !Ref UniShopVpcId
UrlEndpoint:
Url: !Ref UniShopBackendDnsName
HealthUrl: !Join [ "", [ !Ref UniShopBackendDnsName, '/actuator/health' ] ]

UniShopDefaultRoute:
Type: AWS::RefactorSpaces::Route
Properties:
RouteType: DEFAULT
ServiceIdentifier: !GetAtt UniShopLegacyService.ServiceIdentifier
EnvironmentIdentifier: !Ref UniShopRefactorSpacesModernizationEnvironment
ApplicationIdentifier: !GetAtt UniShopRefactorSpacesApplication.ApplicationIdentifier

Outputs:
UniShopApiGatewayProxyUrl:
Value: !GetAtt UniShopRefactorSpacesApplication.ProxyUrl

0 comments on commit 16deb78

Please sign in to comment.