-
Notifications
You must be signed in to change notification settings - Fork 21
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
AWS Marketplace Configuration #403
base: main
Are you sure you want to change the base?
Changes from all commits
817bf27
06bff38
8690e62
8a65ca0
6d5d6c8
76704c3
65cc77e
afad5a5
e643f17
3d8760a
fb3a194
0abed55
7948c48
bd8e66c
04030a7
f9db370
0beb69c
2bf0f9a
4224dd8
abacbb1
0e132a4
2e65f2d
0be9f60
756afda
18d683a
35d01e0
91854d8
4df21b4
680d919
d823ac7
2e3caed
a45b704
61409ec
0c40122
f140ab3
fe6554c
e700af6
e4eab18
0a4c79b
ccd1dd9
17c99d7
0b248ea
cab66a0
23320bf
09a8ba4
f80bae5
162bcee
618b798
a614480
9990f44
83b973c
41863bc
fd522bf
9610bc7
cb08dbf
29e3083
49fcd79
91fd458
18d4997
abb1b5c
e97e029
4b030a4
89c8641
b155d6b
21857b9
a41aa44
0e7bfe2
14ff7f1
1898943
b720ff9
55a70c6
be681f2
ebd0865
bbcb0f7
1823234
5c730e0
c9c8218
389106b
62b53c2
4238201
6bac308
693ffbe
29823e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build AMI | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' # Enforce Semantic Versioning | ||
|
||
jobs: | ||
build_ami: | ||
runs-on: ubuntu-latest | ||
# These permissions are needed by configure-aws-credentials in order | ||
# to interact with GitHub's OIDC Token endpoint. | ||
permissions: | ||
id-token: write # required to use OIDC authentication | ||
contents: read # required to checkout the code from the repo | ||
steps: | ||
- name: Install JQ | ||
run: sudo apt update && sudo apt install -y jq | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. im not seeing where this is utilized There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nevermind, i see it in the sh. Is this usually how we install shell deps? |
||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Extract version | ||
id: version | ||
run: echo version=${GITHUB_REF#refs\/tags\/} >> $GITHUB_OUTPUT | ||
|
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v1-node16 | ||
with: | ||
role-to-assume: arn:aws:iam::376099832799:role/lrsql-imagebuilder-ghacti-BuildAMIGithubActionsRole-IHZUC98qYzfG | ||
role-duration-seconds: 900 # 15 min; minimal duration possible | ||
aws-region: us-east-1 | ||
|
||
- name: Trigger AMI Build | ||
run: $GITHUB_WORKSPACE/dev-resources/template/marketplace/scripts/trigger-update.sh -v ${{ github.event.inputs.version }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,224 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should i assume this is identical to old vpc? if so do we need the dupe? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it is identical I just duped for consistency, but duping here isn't necessary. |
||
Description: SQL LRS VPC With public & private Subnets | ||
Parameters: | ||
VpcCidr: | ||
Description: CIDR block for the vpc itself | ||
Type: String | ||
Default: '173.147.0.0/16' | ||
PublicOneCidr: | ||
Description: CIDR block for public subnet one | ||
Type: String | ||
Default: '173.147.0.0/24' | ||
PublicTwoCidr: | ||
Description: CIDR block for public subnet two | ||
Type: String | ||
Default: '173.147.1.0/24' | ||
PrivateOneCidr: | ||
Description: CIDR block for private subnet one | ||
Type: String | ||
Default: '173.147.2.0/24' | ||
PrivateTwoCidr: | ||
Description: CIDR block for private subnet two | ||
Type: String | ||
Default: '173.147.3.0/24' | ||
|
||
Resources: | ||
# VPC | ||
VPC: | ||
Type: AWS::EC2::VPC | ||
Properties: | ||
EnableDnsSupport: true | ||
EnableDnsHostnames: true | ||
CidrBlock: !Ref VpcCidr | ||
Tags: | ||
- Key: Name | ||
Value: !Sub '${AWS::StackName}-vpc' | ||
|
||
# Two public subnets | ||
PublicSubnetOne: | ||
Type: AWS::EC2::Subnet | ||
Properties: | ||
AvailabilityZone: | ||
Fn::Select: | ||
- 0 | ||
- Fn::GetAZs: {Ref: 'AWS::Region'} | ||
VpcId: !Ref 'VPC' | ||
CidrBlock: !Ref PublicOneCidr | ||
MapPublicIpOnLaunch: true | ||
Tags: | ||
- Key: Name | ||
Value: !Sub '${AWS::StackName}-public-1' | ||
PublicSubnetTwo: | ||
Type: AWS::EC2::Subnet | ||
Properties: | ||
AvailabilityZone: | ||
Fn::Select: | ||
- 1 | ||
- Fn::GetAZs: {Ref: 'AWS::Region'} | ||
VpcId: !Ref 'VPC' | ||
CidrBlock: !Ref PublicTwoCidr | ||
MapPublicIpOnLaunch: true | ||
Tags: | ||
- Key: Name | ||
Value: !Sub '${AWS::StackName}-public-2' | ||
|
||
# Two Private subnets | ||
PrivateSubnetOne: | ||
Type: AWS::EC2::Subnet | ||
Properties: | ||
AvailabilityZone: | ||
Fn::Select: | ||
- 0 | ||
- Fn::GetAZs: {Ref: 'AWS::Region'} | ||
VpcId: !Ref 'VPC' | ||
CidrBlock: !Ref PrivateOneCidr | ||
Tags: | ||
- Key: Name | ||
Value: !Sub '${AWS::StackName}-private-1' | ||
PrivateSubnetTwo: | ||
Type: AWS::EC2::Subnet | ||
Properties: | ||
AvailabilityZone: | ||
Fn::Select: | ||
- 1 | ||
- Fn::GetAZs: {Ref: 'AWS::Region'} | ||
VpcId: !Ref 'VPC' | ||
CidrBlock: !Ref PrivateTwoCidr | ||
Tags: | ||
- Key: Name | ||
Value: !Sub '${AWS::StackName}-private-2' | ||
|
||
# Public Subnet Routing | ||
InternetGateway: | ||
Type: AWS::EC2::InternetGateway | ||
GatewayAttachement: | ||
Type: AWS::EC2::VPCGatewayAttachment | ||
Properties: | ||
VpcId: !Ref 'VPC' | ||
InternetGatewayId: !Ref 'InternetGateway' | ||
PublicRouteTable: | ||
Type: AWS::EC2::RouteTable | ||
Properties: | ||
VpcId: !Ref 'VPC' | ||
PublicRoute: | ||
Type: AWS::EC2::Route | ||
DependsOn: GatewayAttachement | ||
Properties: | ||
RouteTableId: !Ref 'PublicRouteTable' | ||
DestinationCidrBlock: '0.0.0.0/0' | ||
GatewayId: !Ref 'InternetGateway' | ||
PublicSubnetOneRouteTableAssociation: | ||
Type: AWS::EC2::SubnetRouteTableAssociation | ||
Properties: | ||
SubnetId: !Ref PublicSubnetOne | ||
RouteTableId: !Ref PublicRouteTable | ||
PublicSubnetTwoRouteTableAssociation: | ||
Type: AWS::EC2::SubnetRouteTableAssociation | ||
Properties: | ||
SubnetId: !Ref PublicSubnetTwo | ||
RouteTableId: !Ref PublicRouteTable | ||
|
||
|
||
# Private Subnet Routing | ||
NatGatewayOneAttachment: | ||
Type: AWS::EC2::EIP | ||
DependsOn: GatewayAttachement | ||
Properties: | ||
Domain: vpc | ||
NatGatewayTwoAttachment: | ||
Type: AWS::EC2::EIP | ||
DependsOn: GatewayAttachement | ||
Properties: | ||
Domain: vpc | ||
NatGatewayOne: | ||
Type: AWS::EC2::NatGateway | ||
Properties: | ||
AllocationId: !GetAtt NatGatewayOneAttachment.AllocationId | ||
SubnetId: !Ref PublicSubnetOne | ||
NatGatewayTwo: | ||
Type: AWS::EC2::NatGateway | ||
Properties: | ||
AllocationId: !GetAtt NatGatewayTwoAttachment.AllocationId | ||
SubnetId: !Ref PublicSubnetTwo | ||
PrivateRouteTableOne: | ||
Type: AWS::EC2::RouteTable | ||
Properties: | ||
VpcId: !Ref 'VPC' | ||
PrivateRouteOne: | ||
Type: AWS::EC2::Route | ||
Properties: | ||
RouteTableId: !Ref PrivateRouteTableOne | ||
DestinationCidrBlock: 0.0.0.0/0 | ||
NatGatewayId: !Ref NatGatewayOne | ||
PrivateRouteTableOneAssociation: | ||
Type: AWS::EC2::SubnetRouteTableAssociation | ||
Properties: | ||
RouteTableId: !Ref PrivateRouteTableOne | ||
SubnetId: !Ref PrivateSubnetOne | ||
PrivateRouteTableTwo: | ||
Type: AWS::EC2::RouteTable | ||
Properties: | ||
VpcId: !Ref 'VPC' | ||
PrivateRouteTwo: | ||
Type: AWS::EC2::Route | ||
Properties: | ||
RouteTableId: !Ref PrivateRouteTableTwo | ||
DestinationCidrBlock: 0.0.0.0/0 | ||
NatGatewayId: !Ref NatGatewayTwo | ||
PrivateRouteTableTwoAssociation: | ||
Type: AWS::EC2::SubnetRouteTableAssociation | ||
Properties: | ||
RouteTableId: !Ref PrivateRouteTableTwo | ||
SubnetId: !Ref PrivateSubnetTwo | ||
|
||
Outputs: | ||
VPCId: | ||
Description: The ID of the VPC that this stack is deployed in | ||
Value: !Ref 'VPC' | ||
Export: | ||
Name: !Join [ ':', [ !Ref 'AWS::StackName', 'VPCId' ] ] | ||
PublicSubnetOne: | ||
Description: Public subnet one | ||
Value: !Ref 'PublicSubnetOne' | ||
Export: | ||
Name: !Join [ ':', [ !Ref 'AWS::StackName', 'PublicSubnetOne' ] ] | ||
PublicSubnetTwo: | ||
Description: Public subnet two | ||
Value: !Ref 'PublicSubnetTwo' | ||
Export: | ||
Name: !Join [ ':', [ !Ref 'AWS::StackName', 'PublicSubnetTwo' ] ] | ||
PrivateSubnetOne: | ||
Description: Private subnet one | ||
Value: !Ref 'PrivateSubnetOne' | ||
Export: | ||
Name: !Join [ ':', [ !Ref 'AWS::StackName', 'PrivateSubnetOne' ] ] | ||
PrivateSubnetOneAZ: | ||
Description: Private subnet one AZ | ||
Value: !GetAtt 'PrivateSubnetOne.AvailabilityZone' | ||
Export: | ||
Name: !Join [ ':', [ !Ref 'AWS::StackName', 'PrivateSubnetOneAZ' ] ] | ||
PrivateSubnetTwo: | ||
Description: Private subnet two | ||
Value: !Ref 'PrivateSubnetTwo' | ||
Export: | ||
Name: !Join [ ':', [ !Ref 'AWS::StackName', 'PrivateSubnetTwo' ] ] | ||
PrivateSubnetTwoAZ: | ||
Description: Private subnet two AZ | ||
Value: !GetAtt 'PrivateSubnetTwo.AvailabilityZone' | ||
Export: | ||
Name: !Join [ ':', [ !Ref 'AWS::StackName', 'PrivateSubnetTwoAZ' ] ] | ||
PrivateRouteTableOneId: | ||
Description: Private route table 1 id | ||
Value: !Ref PrivateRouteTableOne | ||
Export: | ||
Name: !Join [ ':', [ !Ref 'AWS::StackName', 'PrivateRouteTableOneId' ] ] | ||
PrivateRouteTableTwoId: | ||
Description: Private route table 2 id | ||
Value: !Ref PrivateRouteTableTwo | ||
Export: | ||
Name: !Join [ ':', [ !Ref 'AWS::StackName', 'PrivateRouteTableTwoId' ] ] | ||
PublicRouteTableId: | ||
Description: Public Route table id | ||
Value: !Ref PublicRouteTable | ||
Export: | ||
Name: !Join [ ':', [ !Ref 'AWS::StackName', 'PublicRouteTableId' ] ] |
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.
have you confirmed what happens if we overwrite a tag? That is something that happens on occasion.