qontract-reconcile 0.10.1rc984__py3-none-any.whl → 0.10.1rc985__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qontract-reconcile
3
- Version: 0.10.1rc984
3
+ Version: 0.10.1rc985
4
4
  Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
5
5
  Home-page: https://github.com/app-sre/qontract-reconcile
6
6
  Author: Red Hat App-SRE Team
@@ -710,7 +710,7 @@ reconcile/utils/state.py,sha256=a_EO5u7__Pqd0_E3MqzUttJ-0xRtuxcNx5oQi5WIahI,1639
710
710
  reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,352
711
711
  reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
712
712
  reconcile/utils/terraform_client.py,sha256=tCDVrfmFCB6lGfGhJt13VRkHxGy7Psw88KIze0r-JLo,31787
713
- reconcile/utils/terrascript_aws_client.py,sha256=6eKwBkyesrARf5j1cAaVV9aCECkPDWTxGX1bIZNofbg,277032
713
+ reconcile/utils/terrascript_aws_client.py,sha256=vVUpJZRInTHRZOWr3XFxEon5Q7CIaNt3jhT5eM39UQ8,278023
714
714
  reconcile/utils/three_way_diff_strategy.py,sha256=oQcHXd9LVhirJfoaOBoHUYuZVGfyL2voKr6KVI34zZE,4833
715
715
  reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
716
716
  reconcile/utils/vault.py,sha256=9GSNHku8tw5KM2LKpZ1myWYDLtLGUJgpSnD0DxbzeO0,14956
@@ -851,8 +851,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
851
851
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
852
852
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
853
853
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
854
- qontract_reconcile-0.10.1rc984.dist-info/METADATA,sha256=As6P3u65YzIin_JIIsx6wWgNcd-Uhk0Huwe57X-2P44,2262
855
- qontract_reconcile-0.10.1rc984.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
856
- qontract_reconcile-0.10.1rc984.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
857
- qontract_reconcile-0.10.1rc984.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
858
- qontract_reconcile-0.10.1rc984.dist-info/RECORD,,
854
+ qontract_reconcile-0.10.1rc985.dist-info/METADATA,sha256=6LHjMZZMBaGEpwXw6RRgJTCc4uog6hygujeZ8nFtqV0,2262
855
+ qontract_reconcile-0.10.1rc985.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
856
+ qontract_reconcile-0.10.1rc985.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
857
+ qontract_reconcile-0.10.1rc985.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
858
+ qontract_reconcile-0.10.1rc985.dist-info/RECORD,,
@@ -1196,16 +1196,16 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
1196
1196
  self.add_resource(infra_account_name, tf_resource)
1197
1197
 
1198
1198
  def populate_vpc_requests(
1199
- self, vpc_requests: Iterable[VPCRequest], aws_provider_version: str
1199
+ self, vpc_requests: Iterable[VPCRequest], vpc_module_version: str
1200
1200
  ) -> None:
1201
1201
  for request in vpc_requests:
1202
1202
  # skiping deleted requests
1203
1203
  if request.delete:
1204
1204
  continue
1205
1205
  # The default values here come from infra repo's module configuration
1206
- values = {
1206
+ vpc_module_values = {
1207
1207
  "source": "terraform-aws-modules/vpc/aws",
1208
- "version": aws_provider_version,
1208
+ "version": vpc_module_version,
1209
1209
  "name": request.identifier,
1210
1210
  "cidr": request.cidr_block.network_address,
1211
1211
  "private_subnet_tags": {"kubernetes.io/role/internal-elb": "1"},
@@ -1218,29 +1218,52 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
1218
1218
  }
1219
1219
 
1220
1220
  if request.subnets and request.subnets.public:
1221
- values["public_subnets"] = request.subnets.public
1221
+ vpc_module_values["public_subnets"] = request.subnets.public
1222
1222
  if request.subnets and request.subnets.private:
1223
- values["private_subnets"] = request.subnets.private
1223
+ vpc_module_values["private_subnets"] = request.subnets.private
1224
1224
  if request.subnets and request.subnets.availability_zones:
1225
- values["azs"] = request.subnets.availability_zones
1225
+ vpc_module_values["azs"] = request.subnets.availability_zones
1226
1226
 
1227
1227
  # We only want to enable nat_gateway if we have public and private subnets
1228
1228
  if request.subnets and request.subnets.public and request.subnets.private:
1229
- values["enable_nat_gateway"] = True
1229
+ vpc_module_values["enable_nat_gateway"] = True
1230
1230
 
1231
1231
  aws_account = request.account.name
1232
- module = Module(request.identifier, **values)
1233
- self.add_resource(aws_account, module)
1232
+ vpc_module = Module(request.identifier, **vpc_module_values)
1233
+ self.add_resource(aws_account, vpc_module)
1234
+
1235
+ # vpc_endpoint
1236
+ vpc_endpoint_values = {
1237
+ "source": "terraform-aws-modules/vpc/aws//modules/vpc-endpoints",
1238
+ "version": vpc_module_version,
1239
+ "vpc_id": vpc_module.vpc_id,
1240
+ "endpoints": {
1241
+ "s3": {
1242
+ "service": "s3",
1243
+ "serivce_type": "Gateway",
1244
+ "tags": {
1245
+ "managed_by_integration": self.integration,
1246
+ "Name": f"{request.identifier}--vpce-s3",
1247
+ "route_table_ids": vpc_module.vpc.private_route_table_ids,
1248
+ },
1249
+ }
1250
+ },
1251
+ }
1252
+
1253
+ vpc_endpoint = Module(
1254
+ f"{request.identifier}-endpoint", **vpc_endpoint_values
1255
+ )
1256
+ self.add_resource(aws_account, vpc_endpoint)
1234
1257
 
1235
1258
  # The outputs for module are only working with this sintaxe
1236
1259
  vpc_id_output = Output(
1237
- f"{request.identifier}-vpc_id", value=f"${{{module.vpc_id}}}"
1260
+ f"{request.identifier}-vpc_id", value=f"${{{vpc_module.vpc_id}}}"
1238
1261
  )
1239
1262
  self.add_resource(aws_account, vpc_id_output)
1240
1263
 
1241
1264
  vpc_cidr_block_output = Output(
1242
1265
  f"{request.identifier}-vpc_cidr_block",
1243
- value=f"${{{module.vpc_cidr_block}}}",
1266
+ value=f"${{{vpc_module.vpc_cidr_block}}}",
1244
1267
  )
1245
1268
  self.add_resource(aws_account, vpc_cidr_block_output)
1246
1269