@friggframework/devtools 2.0.0--canary.490.a93ac2c.0 → 2.0.0--canary.490.1829402.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1821,6 +1821,7 @@ class VpcBuilder extends InfrastructureBuilder {
|
|
|
1821
1821
|
|
|
1822
1822
|
result.resources[subnet1AssocLogicalId] = {
|
|
1823
1823
|
Type: 'AWS::EC2::SubnetRouteTableAssociation',
|
|
1824
|
+
UpdateReplacePolicy: 'Delete',
|
|
1824
1825
|
Properties: {
|
|
1825
1826
|
SubnetId: subnet1Id,
|
|
1826
1827
|
RouteTableId: { Ref: 'FriggLambdaRouteTable' },
|
|
@@ -1829,6 +1830,7 @@ class VpcBuilder extends InfrastructureBuilder {
|
|
|
1829
1830
|
|
|
1830
1831
|
result.resources[subnet2AssocLogicalId] = {
|
|
1831
1832
|
Type: 'AWS::EC2::SubnetRouteTableAssociation',
|
|
1833
|
+
UpdateReplacePolicy: 'Delete',
|
|
1832
1834
|
Properties: {
|
|
1833
1835
|
SubnetId: subnet2Id,
|
|
1834
1836
|
RouteTableId: { Ref: 'FriggLambdaRouteTable' },
|
|
@@ -1856,6 +1858,7 @@ class VpcBuilder extends InfrastructureBuilder {
|
|
|
1856
1858
|
|
|
1857
1859
|
result.resources.FriggPrivateSubnet1RouteTableAssociation = {
|
|
1858
1860
|
Type: 'AWS::EC2::SubnetRouteTableAssociation',
|
|
1861
|
+
UpdateReplacePolicy: 'Delete',
|
|
1859
1862
|
Properties: {
|
|
1860
1863
|
SubnetId: subnet1Id,
|
|
1861
1864
|
RouteTableId: routeTableId,
|
|
@@ -1864,6 +1867,7 @@ class VpcBuilder extends InfrastructureBuilder {
|
|
|
1864
1867
|
|
|
1865
1868
|
result.resources.FriggPrivateSubnet2RouteTableAssociation = {
|
|
1866
1869
|
Type: 'AWS::EC2::SubnetRouteTableAssociation',
|
|
1870
|
+
UpdateReplacePolicy: 'Delete',
|
|
1867
1871
|
Properties: {
|
|
1868
1872
|
SubnetId: subnet2Id,
|
|
1869
1873
|
RouteTableId: routeTableId,
|
|
@@ -804,6 +804,35 @@ describe('VpcBuilder', () => {
|
|
|
804
804
|
expect(result.resources.FriggPrivateSubnet2RouteTableAssociation.Properties.RouteTableId).toEqual({ Ref: 'FriggLambdaRouteTable' });
|
|
805
805
|
});
|
|
806
806
|
|
|
807
|
+
it('should add UpdateReplacePolicy to force association recreation on updates', async () => {
|
|
808
|
+
const appDefinition = {
|
|
809
|
+
vpc: {
|
|
810
|
+
enable: true,
|
|
811
|
+
management: 'discover',
|
|
812
|
+
subnets: { management: 'discover' },
|
|
813
|
+
natGateway: { management: 'discover' },
|
|
814
|
+
},
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
const discoveredResources = {
|
|
818
|
+
vpcId: 'vpc-123',
|
|
819
|
+
privateSubnetId1: 'subnet-existing-1',
|
|
820
|
+
privateSubnetId2: 'subnet-existing-2',
|
|
821
|
+
natGatewayId: 'nat-existing',
|
|
822
|
+
routeTableId: 'rtb-old',
|
|
823
|
+
existingLogicalIds: ['FriggSubnet1RouteAssociation', 'FriggSubnet2RouteAssociation'],
|
|
824
|
+
};
|
|
825
|
+
|
|
826
|
+
const result = await vpcBuilder.build(appDefinition, discoveredResources);
|
|
827
|
+
|
|
828
|
+
// Verify associations have UpdateReplacePolicy to force recreation
|
|
829
|
+
expect(result.resources.FriggSubnet1RouteAssociation.UpdateReplacePolicy).toBe('Delete');
|
|
830
|
+
expect(result.resources.FriggSubnet2RouteAssociation.UpdateReplacePolicy).toBe('Delete');
|
|
831
|
+
|
|
832
|
+
// This forces CloudFormation to delete old associations and create new ones
|
|
833
|
+
// instead of trying to update them in-place (which doesn't work)
|
|
834
|
+
});
|
|
835
|
+
|
|
807
836
|
it('should not create NAT when existing NAT is properly placed', async () => {
|
|
808
837
|
const appDefinition = {
|
|
809
838
|
vpc: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/devtools",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.490.
|
|
4
|
+
"version": "2.0.0--canary.490.1829402.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"frigg": "./frigg-cli/index.js"
|
|
7
7
|
},
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"@babel/eslint-parser": "^7.18.9",
|
|
17
17
|
"@babel/parser": "^7.25.3",
|
|
18
18
|
"@babel/traverse": "^7.25.3",
|
|
19
|
-
"@friggframework/core": "2.0.0--canary.490.
|
|
20
|
-
"@friggframework/schemas": "2.0.0--canary.490.
|
|
21
|
-
"@friggframework/test": "2.0.0--canary.490.
|
|
19
|
+
"@friggframework/core": "2.0.0--canary.490.1829402.0",
|
|
20
|
+
"@friggframework/schemas": "2.0.0--canary.490.1829402.0",
|
|
21
|
+
"@friggframework/test": "2.0.0--canary.490.1829402.0",
|
|
22
22
|
"@hapi/boom": "^10.0.1",
|
|
23
23
|
"@inquirer/prompts": "^5.3.8",
|
|
24
24
|
"axios": "^1.7.2",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"validate-npm-package-name": "^5.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@friggframework/eslint-config": "2.0.0--canary.490.
|
|
50
|
-
"@friggframework/prettier-config": "2.0.0--canary.490.
|
|
49
|
+
"@friggframework/eslint-config": "2.0.0--canary.490.1829402.0",
|
|
50
|
+
"@friggframework/prettier-config": "2.0.0--canary.490.1829402.0",
|
|
51
51
|
"aws-sdk-client-mock": "^4.1.0",
|
|
52
52
|
"aws-sdk-client-mock-jest": "^4.1.0",
|
|
53
53
|
"jest": "^30.1.3",
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "182940218468f7784469911050ef45add99615c2"
|
|
83
83
|
}
|