qontract-reconcile 0.10.1rc630__py3-none-any.whl → 0.10.1rc632__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.
- {qontract_reconcile-0.10.1rc630.dist-info → qontract_reconcile-0.10.1rc632.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc630.dist-info → qontract_reconcile-0.10.1rc632.dist-info}/RECORD +6 -6
- reconcile/utils/terrascript_aws_client.py +175 -180
- {qontract_reconcile-0.10.1rc630.dist-info → qontract_reconcile-0.10.1rc632.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc630.dist-info → qontract_reconcile-0.10.1rc632.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc630.dist-info → qontract_reconcile-0.10.1rc632.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc630.dist-info → qontract_reconcile-0.10.1rc632.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.1rc632
|
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
|
{qontract_reconcile-0.10.1rc630.dist-info → qontract_reconcile-0.10.1rc632.dist-info}/RECORD
RENAMED
@@ -610,7 +610,7 @@ reconcile/utils/state.py,sha256=zjsprjbOb0WddzmAvh8ACqAt0fcayrX2YPfz7qceRWw,1609
|
|
610
610
|
reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,352
|
611
611
|
reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
|
612
612
|
reconcile/utils/terraform_client.py,sha256=6hcC0ibXkiFBn-0krVl11Bz29QcW2RI7l40pmTRrRfg,32092
|
613
|
-
reconcile/utils/terrascript_aws_client.py,sha256=
|
613
|
+
reconcile/utils/terrascript_aws_client.py,sha256=AqRnkEBQ3Zw5PS62vq2rUWUQrq3zyud3E3ilfIM2Hgc,270697
|
614
614
|
reconcile/utils/three_way_diff_strategy.py,sha256=nyqeQsLCoPI6e16k2CF3b9KNgQLU-rPf5RtfdUfVMwE,4468
|
615
615
|
reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
|
616
616
|
reconcile/utils/unleash.py,sha256=1D56CsZfE3ShDtN3IErE1T2eeIwNmxhK-yYbCotJ99E,3601
|
@@ -714,8 +714,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
714
714
|
tools/test/test_qontract_cli.py,sha256=OvalpVRfY4pNmpMaWHHYqBjV68b1eGQjX8SCyTAXb1w,3501
|
715
715
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
716
716
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
717
|
-
qontract_reconcile-0.10.
|
718
|
-
qontract_reconcile-0.10.
|
719
|
-
qontract_reconcile-0.10.
|
720
|
-
qontract_reconcile-0.10.
|
721
|
-
qontract_reconcile-0.10.
|
717
|
+
qontract_reconcile-0.10.1rc632.dist-info/METADATA,sha256=TvO8-ERDzrKsAKJGJfAHNBskE8JP8ORvWGTk31i9NB8,2382
|
718
|
+
qontract_reconcile-0.10.1rc632.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
719
|
+
qontract_reconcile-0.10.1rc632.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
|
720
|
+
qontract_reconcile-0.10.1rc632.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
721
|
+
qontract_reconcile-0.10.1rc632.dist-info/RECORD,,
|
@@ -427,7 +427,28 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
427
427
|
ts += Terraform(
|
428
428
|
backend=TerrascriptClient.state_bucket_for_account(
|
429
429
|
self.integration, name, config
|
430
|
-
)
|
430
|
+
),
|
431
|
+
required_providers={
|
432
|
+
"aws": {
|
433
|
+
"source": "hashicorp/aws",
|
434
|
+
"version": self.versions.get(name),
|
435
|
+
},
|
436
|
+
# the time provider can be removed if all AWS accounts
|
437
|
+
# upgrade to a provider version with this bug fix
|
438
|
+
# https://github.com/hashicorp/terraform-provider-aws/pull/20926
|
439
|
+
"time": {
|
440
|
+
"source": "hashicorp/time",
|
441
|
+
"version": "0.9.1",
|
442
|
+
},
|
443
|
+
"random": {
|
444
|
+
"source": "hashicorp/random",
|
445
|
+
"version": "3.4.3",
|
446
|
+
},
|
447
|
+
"template": {
|
448
|
+
"source": "hashicorp/template",
|
449
|
+
"version": "2.2.0",
|
450
|
+
},
|
451
|
+
},
|
431
452
|
)
|
432
453
|
tss[name] = ts
|
433
454
|
locks[name] = Lock()
|
@@ -756,11 +777,11 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
756
777
|
|
757
778
|
# we want to include the console url in the outputs
|
758
779
|
# to be used later to generate the email invitations
|
759
|
-
|
780
|
+
output_name = "{}_console-urls__{}".format(
|
760
781
|
self.integration_prefix, account_name
|
761
782
|
)
|
762
783
|
output_value = account_console_url
|
763
|
-
tf_output = Output(
|
784
|
+
tf_output = Output(output_name, value=output_value)
|
764
785
|
self.add_resource(account_name, tf_output)
|
765
786
|
|
766
787
|
for user in users:
|
@@ -817,15 +838,13 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
817
838
|
# we want the outputs to be formed into a mail invitation
|
818
839
|
# for each new user. we form an output of the form
|
819
840
|
# 'qrtf.enc-passwords[user_name] = <encrypted password>
|
820
|
-
|
841
|
+
output_name = "{}_enc-passwords__{}".format(
|
821
842
|
self.integration_prefix, user_name
|
822
843
|
)
|
823
844
|
output_value = (
|
824
845
|
"${" + tf_iam_user_login_profile.encrypted_password + "}"
|
825
846
|
)
|
826
|
-
tf_output = Output(
|
827
|
-
output_name_0_13, value=output_value, sensitive=True
|
828
|
-
)
|
847
|
+
tf_output = Output(output_name, value=output_value, sensitive=True)
|
829
848
|
self.add_resource(account_name, tf_output)
|
830
849
|
|
831
850
|
for user_policy in user_policies:
|
@@ -1633,11 +1652,9 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
1633
1652
|
ca_cert = values.pop("ca_cert", None)
|
1634
1653
|
if ca_cert:
|
1635
1654
|
# db.ca_cert
|
1636
|
-
|
1655
|
+
output_name = output_prefix + "__db_ca_cert"
|
1637
1656
|
output_value = self.secret_reader.read(ca_cert)
|
1638
|
-
tf_resources.append(
|
1639
|
-
Output(output_name_0_13, value=output_value, sensitive=True)
|
1640
|
-
)
|
1657
|
+
tf_resources.append(Output(output_name, value=output_value, sensitive=True))
|
1641
1658
|
|
1642
1659
|
region = self._region_from_availability_zone(az) or self.default_regions.get(
|
1643
1660
|
account
|
@@ -1777,31 +1794,27 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
1777
1794
|
# we want the outputs to be formed into an OpenShift Secret
|
1778
1795
|
# with the following fields
|
1779
1796
|
# db.host
|
1780
|
-
|
1797
|
+
output_name = output_prefix + "__db_host"
|
1781
1798
|
output_value = "${" + tf_resource.address + "}"
|
1782
|
-
tf_resources.append(Output(
|
1799
|
+
tf_resources.append(Output(output_name, value=output_value))
|
1783
1800
|
# db.port
|
1784
|
-
|
1801
|
+
output_name = output_prefix + "__db_port"
|
1785
1802
|
output_value = "${" + str(tf_resource.port) + "}"
|
1786
|
-
tf_resources.append(Output(
|
1803
|
+
tf_resources.append(Output(output_name, value=output_value))
|
1787
1804
|
# db.name
|
1788
|
-
|
1805
|
+
output_name = output_prefix + "__db_name"
|
1789
1806
|
output_value = output_resource_db_name or values.get("name", "")
|
1790
|
-
tf_resources.append(Output(
|
1807
|
+
tf_resources.append(Output(output_name, value=output_value))
|
1791
1808
|
# only set db user/password if not a replica or creation from snapshot
|
1792
1809
|
if self._db_needs_auth(values):
|
1793
1810
|
# db.user
|
1794
|
-
|
1811
|
+
output_name = output_prefix + "__db_user"
|
1795
1812
|
output_value = values["username"]
|
1796
|
-
tf_resources.append(
|
1797
|
-
Output(output_name_0_13, value=output_value, sensitive=True)
|
1798
|
-
)
|
1813
|
+
tf_resources.append(Output(output_name, value=output_value, sensitive=True))
|
1799
1814
|
# db.password
|
1800
|
-
|
1815
|
+
output_name = output_prefix + "__db_password"
|
1801
1816
|
output_value = values["password"]
|
1802
|
-
tf_resources.append(
|
1803
|
-
Output(output_name_0_13, value=output_value, sensitive=True)
|
1804
|
-
)
|
1817
|
+
tf_resources.append(Output(output_name, value=output_value, sensitive=True))
|
1805
1818
|
# only add reset_password key to the terraform state
|
1806
1819
|
# if reset_password_current_value is defined.
|
1807
1820
|
# this means that if the reset_password field is removed
|
@@ -1809,9 +1822,9 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
1809
1822
|
# removed from the state and from the output resource,
|
1810
1823
|
# leading to a recycle of the pods using this resource.
|
1811
1824
|
if reset_password_current_value:
|
1812
|
-
|
1825
|
+
output_name = output_prefix + "__reset_password"
|
1813
1826
|
output_value = reset_password_current_value
|
1814
|
-
tf_resources.append(Output(
|
1827
|
+
tf_resources.append(Output(output_name, value=output_value))
|
1815
1828
|
|
1816
1829
|
self.add_resources(account, tf_resources)
|
1817
1830
|
|
@@ -2078,14 +2091,14 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
2078
2091
|
values["provider"] = "aws." + region
|
2079
2092
|
bucket_tf_resource = aws_s3_bucket(identifier, **values)
|
2080
2093
|
tf_resources.append(bucket_tf_resource)
|
2081
|
-
|
2094
|
+
output_name = output_prefix + "__bucket"
|
2082
2095
|
output_value = bucket_tf_resource.bucket
|
2083
|
-
tf_resources.append(Output(
|
2084
|
-
|
2085
|
-
tf_resources.append(Output(
|
2096
|
+
tf_resources.append(Output(output_name, value=output_value))
|
2097
|
+
output_name = output_prefix + "__aws_region"
|
2098
|
+
tf_resources.append(Output(output_name, value=region))
|
2086
2099
|
endpoint = "s3.{}.amazonaws.com".format(region)
|
2087
|
-
|
2088
|
-
tf_resources.append(Output(
|
2100
|
+
output_name = output_prefix + "__endpoint"
|
2101
|
+
tf_resources.append(Output(output_name, value=endpoint))
|
2089
2102
|
|
2090
2103
|
sqs_identifier = common_values.get("sqs_identifier", None)
|
2091
2104
|
if sqs_identifier is not None:
|
@@ -2334,25 +2347,23 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
2334
2347
|
# we want the outputs to be formed into an OpenShift Secret
|
2335
2348
|
# with the following fields
|
2336
2349
|
# db.endpoint
|
2337
|
-
|
2350
|
+
output_name = output_prefix + "__db_endpoint"
|
2338
2351
|
# https://docs.aws.amazon.com/AmazonElastiCache/
|
2339
2352
|
# latest/red-ug/Endpoints.html
|
2340
2353
|
if pg_cluster_enabled:
|
2341
2354
|
output_value = "${" + tf_resource.configuration_endpoint_address + "}"
|
2342
2355
|
else:
|
2343
2356
|
output_value = "${" + tf_resource.primary_endpoint_address + "}"
|
2344
|
-
tf_resources.append(Output(
|
2357
|
+
tf_resources.append(Output(output_name, value=output_value))
|
2345
2358
|
# db.port
|
2346
|
-
|
2359
|
+
output_name = output_prefix + "__db_port"
|
2347
2360
|
output_value = "${" + str(tf_resource.port) + "}"
|
2348
|
-
tf_resources.append(Output(
|
2361
|
+
tf_resources.append(Output(output_name, value=output_value))
|
2349
2362
|
# db.auth_token
|
2350
2363
|
if values.get("transit_encryption_enabled", False):
|
2351
|
-
|
2364
|
+
output_name = output_prefix + "__db_auth_token"
|
2352
2365
|
output_value = values["auth_token"]
|
2353
|
-
tf_resources.append(
|
2354
|
-
Output(output_name_0_13, value=output_value, sensitive=True)
|
2355
|
-
)
|
2366
|
+
tf_resources.append(Output(output_name, value=output_value, sensitive=True))
|
2356
2367
|
|
2357
2368
|
self.add_resources(account, tf_resources)
|
2358
2369
|
|
@@ -2397,8 +2408,8 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
2397
2408
|
for k, v in data.items():
|
2398
2409
|
to_replace = "${" + k + "}"
|
2399
2410
|
user_policy = user_policy.replace(to_replace, v)
|
2400
|
-
|
2401
|
-
tf_resources.append(Output(
|
2411
|
+
output_name = output_prefix + "__{}".format(k)
|
2412
|
+
tf_resources.append(Output(output_name, value=v))
|
2402
2413
|
|
2403
2414
|
tf_aws_iam_policy = aws_iam_policy(
|
2404
2415
|
identifier,
|
@@ -2427,8 +2438,8 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
2427
2438
|
# OCM AWS infrastructure access.
|
2428
2439
|
assume_role = aws_infrastructure_access.get("assume_role")
|
2429
2440
|
if assume_role:
|
2430
|
-
|
2431
|
-
tf_resources.append(Output(
|
2441
|
+
output_name = output_prefix + "__role_arn"
|
2442
|
+
tf_resources.append(Output(output_name, value=assume_role))
|
2432
2443
|
elif ocm_map:
|
2433
2444
|
cluster = aws_infrastructure_access["cluster"]["name"]
|
2434
2445
|
ocm = ocm_map.get(cluster)
|
@@ -2443,10 +2454,8 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
2443
2454
|
switch_role_arn = awsh.get_role_arn_from_role_link(
|
2444
2455
|
switch_role_link
|
2445
2456
|
)
|
2446
|
-
|
2447
|
-
tf_resources.append(
|
2448
|
-
Output(output_name_0_13, value=switch_role_arn)
|
2449
|
-
)
|
2457
|
+
output_name = output_prefix + "__role_arn"
|
2458
|
+
tf_resources.append(Output(output_name, value=switch_role_arn))
|
2450
2459
|
else:
|
2451
2460
|
raise KeyError(
|
2452
2461
|
f"[{account}/{identifier}] "
|
@@ -2489,9 +2498,9 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
2489
2498
|
)
|
2490
2499
|
)
|
2491
2500
|
|
2492
|
-
|
2501
|
+
output_name = output_prefix + "__secrets_prefix"
|
2493
2502
|
output_value = secrets_prefix
|
2494
|
-
tf_resources.append(Output(
|
2503
|
+
tf_resources.append(Output(output_name, value=output_value))
|
2495
2504
|
|
2496
2505
|
self.add_resources(account, tf_resources)
|
2497
2506
|
|
@@ -2558,9 +2567,9 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
2558
2567
|
tf_resources.append(tf_aws_iam_policy_attachment)
|
2559
2568
|
|
2560
2569
|
# output role arn
|
2561
|
-
|
2570
|
+
output_name = output_prefix + "__role_arn"
|
2562
2571
|
output_value = "${" + role_tf_resource.arn + "}"
|
2563
|
-
tf_resources.append(Output(
|
2572
|
+
tf_resources.append(Output(output_name, value=output_value))
|
2564
2573
|
|
2565
2574
|
self.add_resources(account, tf_resources)
|
2566
2575
|
|
@@ -2675,13 +2684,13 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
2675
2684
|
kms_keys.add(values["kms_master_key_id"])
|
2676
2685
|
queue_tf_resource = aws_sqs_queue(queue, **values)
|
2677
2686
|
tf_resources.append(queue_tf_resource)
|
2678
|
-
|
2679
|
-
tf_resources.append(Output(
|
2680
|
-
|
2687
|
+
output_name = output_prefix + "__aws_region"
|
2688
|
+
tf_resources.append(Output(output_name, value=region))
|
2689
|
+
output_name = "{}__{}".format(output_prefix, queue_key)
|
2681
2690
|
output_value = "https://sqs.{}.amazonaws.com/{}/{}".format(
|
2682
2691
|
region, uid, queue_name
|
2683
2692
|
)
|
2684
|
-
tf_resources.append(Output(
|
2693
|
+
tf_resources.append(Output(output_name, value=output_value))
|
2685
2694
|
all_queues_per_spec.append(all_queues)
|
2686
2695
|
|
2687
2696
|
# iam resources
|
@@ -2793,11 +2802,11 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
2793
2802
|
)
|
2794
2803
|
tf_resources.append(sub_tf_resource)
|
2795
2804
|
|
2796
|
-
|
2797
|
-
tf_resources.append(Output(
|
2798
|
-
|
2805
|
+
output_name = output_prefix + "__aws_region"
|
2806
|
+
tf_resources.append(Output(output_name, value=region))
|
2807
|
+
output_name = output_prefix + "__endpoint"
|
2799
2808
|
output_value = f"https://sns.{region}.amazonaws.com"
|
2800
|
-
tf_resources.append(Output(
|
2809
|
+
tf_resources.append(Output(output_name, value=output_value))
|
2801
2810
|
self.add_resources(account, tf_resources)
|
2802
2811
|
|
2803
2812
|
def populate_tf_resource_dynamodb(self, spec):
|
@@ -2833,14 +2842,14 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
2833
2842
|
values["provider"] = "aws." + region
|
2834
2843
|
table_tf_resource = aws_dynamodb_table(table, **values)
|
2835
2844
|
tf_resources.append(table_tf_resource)
|
2836
|
-
|
2837
|
-
tf_resources.append(Output(
|
2845
|
+
output_name = "{}__{}".format(output_prefix, table_key)
|
2846
|
+
tf_resources.append(Output(output_name, value=table))
|
2838
2847
|
|
2839
|
-
|
2840
|
-
tf_resources.append(Output(
|
2841
|
-
|
2848
|
+
output_name = output_prefix + "__aws_region"
|
2849
|
+
tf_resources.append(Output(output_name, value=region))
|
2850
|
+
output_name = output_prefix + "__endpoint"
|
2842
2851
|
output_value = f"https://dynamodb.{region}.amazonaws.com"
|
2843
|
-
tf_resources.append(Output(
|
2852
|
+
tf_resources.append(Output(output_name, value=output_value))
|
2844
2853
|
|
2845
2854
|
# iam resources
|
2846
2855
|
# Terraform resource reference:
|
@@ -2919,13 +2928,13 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
2919
2928
|
values["repository_name"] = values.pop("name")
|
2920
2929
|
ecr_tf_resource = aws_ecrpublic_repository(identifier, **values)
|
2921
2930
|
tf_resources.append(ecr_tf_resource)
|
2922
|
-
|
2931
|
+
output_name = output_prefix + "__url"
|
2923
2932
|
output_value = "${" + ecr_tf_resource.repository_url + "}"
|
2924
2933
|
if public:
|
2925
2934
|
output_value = "${" + ecr_tf_resource.repository_uri + "}"
|
2926
|
-
tf_resources.append(Output(
|
2927
|
-
|
2928
|
-
tf_resources.append(Output(
|
2935
|
+
tf_resources.append(Output(output_name, value=output_value))
|
2936
|
+
output_name = output_prefix + "__aws_region"
|
2937
|
+
tf_resources.append(Output(output_name, value=region))
|
2929
2938
|
|
2930
2939
|
# iam resources
|
2931
2940
|
# Terraform resource reference:
|
@@ -3113,23 +3122,23 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
3113
3122
|
|
3114
3123
|
# outputs
|
3115
3124
|
# cloud_front_origin_access_identity_id
|
3116
|
-
|
3125
|
+
output_name = output_prefix + "__cloud_front_origin_access_identity_id"
|
3117
3126
|
output_value = "${" + cf_oai_tf_resource.id + "}"
|
3118
|
-
tf_resources.append(Output(
|
3127
|
+
tf_resources.append(Output(output_name, value=output_value))
|
3119
3128
|
# s3_canonical_user_id
|
3120
|
-
|
3129
|
+
output_name = output_prefix + "__s3_canonical_user_id"
|
3121
3130
|
output_value = "${" + cf_oai_tf_resource.s3_canonical_user_id + "}"
|
3122
|
-
tf_resources.append(Output(
|
3131
|
+
tf_resources.append(Output(output_name, value=output_value))
|
3123
3132
|
# distribution_domain
|
3124
|
-
|
3133
|
+
output_name = output_prefix + "__distribution_domain"
|
3125
3134
|
output_value = "${" + cf_distribution_tf_resource.domain_name + "}"
|
3126
|
-
tf_resources.append(Output(
|
3135
|
+
tf_resources.append(Output(output_name, value=output_value))
|
3127
3136
|
# origin_access_identity
|
3128
|
-
|
3137
|
+
output_name = output_prefix + "__origin_access_identity"
|
3129
3138
|
output_value = (
|
3130
3139
|
"origin-access-identity/cloudfront/" + "${" + cf_oai_tf_resource.id + "}"
|
3131
3140
|
)
|
3132
|
-
tf_resources.append(Output(
|
3141
|
+
tf_resources.append(Output(output_name, value=output_value))
|
3133
3142
|
|
3134
3143
|
self.add_resources(account, tf_resources)
|
3135
3144
|
|
@@ -3278,17 +3287,13 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
3278
3287
|
tf_resources.append(access_key_tf_resource)
|
3279
3288
|
# outputs
|
3280
3289
|
# sqs_aws_access_key_id
|
3281
|
-
|
3290
|
+
output_name = output_prefix + "__sqs_aws_access_key_id"
|
3282
3291
|
output_value = "${" + access_key_tf_resource.id + "}"
|
3283
|
-
tf_resources.append(
|
3284
|
-
Output(output_name_0_13, value=output_value, sensitive=True)
|
3285
|
-
)
|
3292
|
+
tf_resources.append(Output(output_name, value=output_value, sensitive=True))
|
3286
3293
|
# sqs_aws_secret_access_key
|
3287
|
-
|
3294
|
+
output_name = output_prefix + "__sqs_aws_secret_access_key"
|
3288
3295
|
output_value = "${" + access_key_tf_resource.secret + "}"
|
3289
|
-
tf_resources.append(
|
3290
|
-
Output(output_name_0_13, value=output_value, sensitive=True)
|
3291
|
-
)
|
3296
|
+
tf_resources.append(Output(output_name, value=output_value, sensitive=True))
|
3292
3297
|
|
3293
3298
|
# iam policy for queue
|
3294
3299
|
values = {}
|
@@ -3332,11 +3337,11 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
3332
3337
|
tf_resources.append(user_policy_attachment_tf_resource)
|
3333
3338
|
|
3334
3339
|
# outputs
|
3335
|
-
|
3340
|
+
output_name = "{}__{}".format(output_prefix, sqs_identifier)
|
3336
3341
|
output_value = "https://sqs.{}.amazonaws.com/{}/{}".format(
|
3337
3342
|
region, uid, sqs_identifier
|
3338
3343
|
)
|
3339
|
-
tf_resources.append(Output(
|
3344
|
+
tf_resources.append(Output(output_name, value=output_value))
|
3340
3345
|
|
3341
3346
|
self.add_resources(account, tf_resources)
|
3342
3347
|
|
@@ -3501,11 +3506,11 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
3501
3506
|
)
|
3502
3507
|
tf_resources.append(subscription_tf_resource)
|
3503
3508
|
|
3504
|
-
|
3509
|
+
output_name = output_prefix + "__log_group_name"
|
3505
3510
|
output_value = log_group_tf_resource.name
|
3506
|
-
tf_resources.append(Output(
|
3507
|
-
|
3508
|
-
tf_resources.append(Output(
|
3511
|
+
tf_resources.append(Output(output_name, value=output_value))
|
3512
|
+
output_name = output_prefix + "__aws_region"
|
3513
|
+
tf_resources.append(Output(output_name, value=region))
|
3509
3514
|
|
3510
3515
|
# iam resources
|
3511
3516
|
# Terraform resource reference:
|
@@ -3595,9 +3600,9 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
3595
3600
|
tf_resources.append(tf_resource)
|
3596
3601
|
|
3597
3602
|
# key_id
|
3598
|
-
|
3603
|
+
output_name = output_prefix + "__key_id"
|
3599
3604
|
output_value = "${" + tf_resource.key_id + "}"
|
3600
|
-
tf_resources.append(Output(
|
3605
|
+
tf_resources.append(Output(output_name, value=output_value))
|
3601
3606
|
|
3602
3607
|
alias_values = {}
|
3603
3608
|
alias_values["name"] = "alias/" + identifier
|
@@ -3815,11 +3820,11 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
3815
3820
|
|
3816
3821
|
# outputs
|
3817
3822
|
# stream_name
|
3818
|
-
|
3819
|
-
tf_resources.append(Output(
|
3823
|
+
output_name = output_prefix + "__stream_name"
|
3824
|
+
tf_resources.append(Output(output_name, value=identifier))
|
3820
3825
|
# aws_region
|
3821
|
-
|
3822
|
-
tf_resources.append(Output(
|
3826
|
+
output_name = output_prefix + "__aws_region"
|
3827
|
+
tf_resources.append(Output(output_name, value=region))
|
3823
3828
|
|
3824
3829
|
# iam resources
|
3825
3830
|
policy = {
|
@@ -3937,17 +3942,13 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
3937
3942
|
tf_resources.append(tf_resource)
|
3938
3943
|
# outputs
|
3939
3944
|
# aws_access_key_id
|
3940
|
-
|
3945
|
+
output_name = output_prefix + "__aws_access_key_id"
|
3941
3946
|
output_value = "${" + tf_resource.id + "}"
|
3942
|
-
tf_resources.append(
|
3943
|
-
Output(output_name_0_13, value=output_value, sensitive=True)
|
3944
|
-
)
|
3947
|
+
tf_resources.append(Output(output_name, value=output_value, sensitive=True))
|
3945
3948
|
# aws_secret_access_key
|
3946
|
-
|
3949
|
+
output_name = output_prefix + "__aws_secret_access_key"
|
3947
3950
|
output_value = "${" + tf_resource.secret + "}"
|
3948
|
-
tf_resources.append(
|
3949
|
-
Output(output_name_0_13, value=output_value, sensitive=True)
|
3950
|
-
)
|
3951
|
+
tf_resources.append(Output(output_name, value=output_value, sensitive=True))
|
3951
3952
|
|
3952
3953
|
return tf_resources
|
3953
3954
|
|
@@ -4073,39 +4074,39 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
4073
4074
|
tf_resources: list[Resource],
|
4074
4075
|
spec: ExternalResourceSpec,
|
4075
4076
|
):
|
4076
|
-
|
4077
|
+
output_format = "{}__{}_{}"
|
4077
4078
|
# cluster
|
4078
|
-
|
4079
|
+
output_name = output_format.format(
|
4079
4080
|
spec.output_prefix, self.integration_prefix, "cluster"
|
4080
4081
|
)
|
4081
4082
|
output_value = spec.cluster_name
|
4082
|
-
tf_resources.append(Output(
|
4083
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4083
4084
|
# namespace
|
4084
|
-
|
4085
|
+
output_name = output_format.format(
|
4085
4086
|
spec.output_prefix, self.integration_prefix, "namespace"
|
4086
4087
|
)
|
4087
4088
|
output_value = spec.namespace_name
|
4088
|
-
tf_resources.append(Output(
|
4089
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4089
4090
|
# resource
|
4090
|
-
|
4091
|
+
output_name = output_format.format(
|
4091
4092
|
spec.output_prefix, self.integration_prefix, "resource"
|
4092
4093
|
)
|
4093
4094
|
output_value = "Secret"
|
4094
|
-
tf_resources.append(Output(
|
4095
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4095
4096
|
# output_resource_name
|
4096
|
-
|
4097
|
+
output_name = output_format.format(
|
4097
4098
|
spec.output_prefix, self.integration_prefix, "output_resource_name"
|
4098
4099
|
)
|
4099
4100
|
output_value = spec.output_resource_name
|
4100
|
-
tf_resources.append(Output(
|
4101
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4101
4102
|
# annotations
|
4102
4103
|
if spec.annotations():
|
4103
|
-
|
4104
|
+
output_name = output_format.format(
|
4104
4105
|
spec.output_prefix, self.integration_prefix, "annotations"
|
4105
4106
|
)
|
4106
4107
|
anno_json = json.dumps(spec.annotations()).encode("utf-8")
|
4107
4108
|
output_value = base64.b64encode(anno_json).decode()
|
4108
|
-
tf_resources.append(Output(
|
4109
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4109
4110
|
|
4110
4111
|
def prefetch_resources(self, schema) -> dict[str, dict[str, str]]:
|
4111
4112
|
gqlapi = gql.get_api()
|
@@ -4301,18 +4302,18 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
4301
4302
|
arn = f"${{{log_group_tf_resource.arn}}}"
|
4302
4303
|
|
4303
4304
|
# add arn to output
|
4304
|
-
|
4305
|
+
output_name = (
|
4305
4306
|
f"{output_prefix}__cloudwatch_log_group_" f"{log_type.lower()}_arn"
|
4306
4307
|
)
|
4307
4308
|
output_value = arn
|
4308
|
-
tf_resources.append(Output(
|
4309
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4309
4310
|
|
4310
4311
|
# add name to output
|
4311
|
-
|
4312
|
+
output_name = (
|
4312
4313
|
f"{output_prefix}__cloudwatch_log_group_" f"{log_type.lower()}_name"
|
4313
4314
|
)
|
4314
4315
|
output_value = log_type_identifier
|
4315
|
-
tf_resources.append(Output(
|
4316
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4316
4317
|
publishing_options.append({
|
4317
4318
|
"log_type": log_type,
|
4318
4319
|
"enabled": True,
|
@@ -4585,31 +4586,31 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
4585
4586
|
|
4586
4587
|
# Setup outputs
|
4587
4588
|
# arn
|
4588
|
-
|
4589
|
+
output_name = output_prefix + "__arn"
|
4589
4590
|
output_value = "${" + es_tf_resource.arn + "}"
|
4590
|
-
tf_resources.append(Output(
|
4591
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4591
4592
|
# domain_id
|
4592
|
-
|
4593
|
+
output_name = output_prefix + "__domain_id"
|
4593
4594
|
output_value = "${" + es_tf_resource.domain_id + "}"
|
4594
|
-
tf_resources.append(Output(
|
4595
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4595
4596
|
# domain_name
|
4596
|
-
|
4597
|
+
output_name = output_prefix + "__domain_name"
|
4597
4598
|
output_value = es_tf_resource.domain_name
|
4598
|
-
tf_resources.append(Output(
|
4599
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4599
4600
|
# endpoint
|
4600
|
-
|
4601
|
+
output_name = output_prefix + "__endpoint"
|
4601
4602
|
output_value = "https://" + "${" + es_tf_resource.endpoint + "}"
|
4602
|
-
tf_resources.append(Output(
|
4603
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4603
4604
|
# kibana_endpoint
|
4604
|
-
|
4605
|
+
output_name = output_prefix + "__kibana_endpoint"
|
4605
4606
|
output_value = "https://" + "${" + es_tf_resource.kibana_endpoint + "}"
|
4606
|
-
tf_resources.append(Output(
|
4607
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4607
4608
|
# vpc_id
|
4608
|
-
|
4609
|
+
output_name = output_prefix + "__vpc_id"
|
4609
4610
|
output_value = (
|
4610
4611
|
"${aws_elasticsearch_domain." + identifier + ".vpc_options.0.vpc_id}"
|
4611
4612
|
)
|
4612
|
-
tf_resources.append(Output(
|
4613
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4613
4614
|
# add master user creds to output and secretsmanager if internal_user_database_enabled
|
4614
4615
|
security_options = es_values.get("advanced_security_options", None)
|
4615
4616
|
if security_options and security_options.get(
|
@@ -4660,24 +4661,20 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
4660
4661
|
)
|
4661
4662
|
tf_resources.append(iam_policy_resource)
|
4662
4663
|
|
4663
|
-
|
4664
|
+
output_name = output_prefix + "__secret_name"
|
4664
4665
|
output_value = secret_name
|
4665
|
-
tf_resources.append(Output(
|
4666
|
-
|
4666
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4667
|
+
output_name = output_prefix + "__secret_policy_arn"
|
4667
4668
|
output_value = "${" + iam_policy_resource.arn + "}"
|
4668
|
-
tf_resources.append(Output(
|
4669
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4669
4670
|
# master_user_name
|
4670
|
-
|
4671
|
+
output_name = output_prefix + "__master_user_name"
|
4671
4672
|
output_value = master_user["master_user_name"]
|
4672
|
-
tf_resources.append(
|
4673
|
-
Output(output_name_0_13, value=output_value, sensitive=True)
|
4674
|
-
)
|
4673
|
+
tf_resources.append(Output(output_name, value=output_value, sensitive=True))
|
4675
4674
|
# master_user_password
|
4676
|
-
|
4675
|
+
output_name = output_prefix + "__master_user_password"
|
4677
4676
|
output_value = master_user["master_user_password"]
|
4678
|
-
tf_resources.append(
|
4679
|
-
Output(output_name_0_13, value=output_value, sensitive=True)
|
4680
|
-
)
|
4677
|
+
tf_resources.append(Output(output_name, value=output_value, sensitive=True))
|
4681
4678
|
|
4682
4679
|
self.add_resources(account, tf_resources)
|
4683
4680
|
|
@@ -4755,37 +4752,35 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
4755
4752
|
|
4756
4753
|
# outputs
|
4757
4754
|
# arn
|
4758
|
-
|
4755
|
+
output_name = output_prefix + "__arn"
|
4759
4756
|
output_value = "${" + acm_tf_resource.arn + "}"
|
4760
|
-
tf_resources.append(Output(
|
4757
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4761
4758
|
# domain name
|
4762
|
-
#
|
4759
|
+
# output_name = output_prefix + '__domain_name'
|
4763
4760
|
# output_value = '${' + acm_tf_resource.domain_name + '}'
|
4764
|
-
# tf_resources.append(Output(
|
4761
|
+
# tf_resources.append(Output(output_name, value=output_value))
|
4765
4762
|
# status
|
4766
|
-
|
4763
|
+
output_name = output_prefix + "__status"
|
4767
4764
|
output_value = "${" + acm_tf_resource.status + "}"
|
4768
|
-
tf_resources.append(Output(
|
4765
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4769
4766
|
# domain_validation_options
|
4770
|
-
|
4767
|
+
output_name = output_prefix + "__domain_validation_options"
|
4771
4768
|
output_value = "${" + acm_tf_resource.domain_validation_options + "}"
|
4772
|
-
tf_resources.append(Output(
|
4769
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4773
4770
|
if secret is not None:
|
4774
4771
|
# key
|
4775
|
-
|
4772
|
+
output_name = output_prefix + "__key"
|
4776
4773
|
output_value = key
|
4777
|
-
tf_resources.append(Output(
|
4774
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4778
4775
|
# certificate
|
4779
|
-
|
4776
|
+
output_name = output_prefix + "__certificate"
|
4780
4777
|
output_value = certificate
|
4781
|
-
tf_resources.append(
|
4782
|
-
Output(output_name_0_13, value=output_value, sensitive=True)
|
4783
|
-
)
|
4778
|
+
tf_resources.append(Output(output_name, value=output_value, sensitive=True))
|
4784
4779
|
if caCertificate is not None:
|
4785
|
-
|
4780
|
+
output_name = output_prefix + "__caCertificate"
|
4786
4781
|
output_value = caCertificate
|
4787
4782
|
tf_resources.append(
|
4788
|
-
Output(
|
4783
|
+
Output(output_name, value=output_value, sensitive=True)
|
4789
4784
|
)
|
4790
4785
|
|
4791
4786
|
self.add_resources(account, tf_resources)
|
@@ -4823,17 +4818,17 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
4823
4818
|
|
4824
4819
|
# outputs
|
4825
4820
|
# etag
|
4826
|
-
|
4821
|
+
output_name = output_prefix + "_etag"
|
4827
4822
|
output_value = "${" + pk_tf_resource.etag + "}"
|
4828
|
-
tf_resources.append(Output(
|
4823
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4829
4824
|
# id
|
4830
|
-
|
4825
|
+
output_name = output_prefix + "__id"
|
4831
4826
|
output_value = "${" + pk_tf_resource.id + "}"
|
4832
|
-
tf_resources.append(Output(
|
4827
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4833
4828
|
# key
|
4834
|
-
|
4829
|
+
output_name = output_prefix + "__key"
|
4835
4830
|
output_value = key
|
4836
|
-
tf_resources.append(Output(
|
4831
|
+
tf_resources.append(Output(output_name, value=output_value))
|
4837
4832
|
|
4838
4833
|
self.add_resources(account, tf_resources)
|
4839
4834
|
|
@@ -5201,13 +5196,13 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
5201
5196
|
|
5202
5197
|
# outputs
|
5203
5198
|
# dns name
|
5204
|
-
|
5199
|
+
output_name = output_prefix + "__dns_name"
|
5205
5200
|
output_value = f"${{{lb_tf_resource.dns_name}}}"
|
5206
|
-
tf_resources.append(Output(
|
5201
|
+
tf_resources.append(Output(output_name, value=output_value))
|
5207
5202
|
# vpc cidr block
|
5208
|
-
|
5203
|
+
output_name = output_prefix + "__vpc_cidr_block"
|
5209
5204
|
output_value = vpc_cidr_block
|
5210
|
-
tf_resources.append(Output(
|
5205
|
+
tf_resources.append(Output(output_name, value=output_value))
|
5211
5206
|
|
5212
5207
|
self.add_resources(account, tf_resources)
|
5213
5208
|
|
@@ -5246,12 +5241,12 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
5246
5241
|
tf_resources.append(aws_version_resource)
|
5247
5242
|
|
5248
5243
|
# outputs
|
5249
|
-
|
5244
|
+
output_name = output_prefix + "__arn"
|
5250
5245
|
output_value = "${" + aws_version_resource.arn + "}"
|
5251
|
-
tf_resources.append(Output(
|
5252
|
-
|
5246
|
+
tf_resources.append(Output(output_name, value=output_value))
|
5247
|
+
output_name = output_prefix + "__version_id"
|
5253
5248
|
output_value = "${" + aws_version_resource.version_id + "}"
|
5254
|
-
tf_resources.append(Output(
|
5249
|
+
tf_resources.append(Output(output_name, value=output_value))
|
5255
5250
|
|
5256
5251
|
self.add_resources(account, tf_resources)
|
5257
5252
|
|
@@ -5445,12 +5440,12 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
|
|
5445
5440
|
tf_resources.append(asg_resource)
|
5446
5441
|
|
5447
5442
|
# outputs
|
5448
|
-
|
5443
|
+
output_name = output_prefix + "__template_latest_version"
|
5449
5444
|
output_value = "${" + template_resource.latest_version + "}"
|
5450
|
-
tf_resources.append(Output(
|
5451
|
-
|
5445
|
+
tf_resources.append(Output(output_name, value=output_value))
|
5446
|
+
output_name = output_prefix + "__image_id"
|
5452
5447
|
output_value = image_id
|
5453
|
-
tf_resources.append(Output(
|
5448
|
+
tf_resources.append(Output(output_name, value=output_value))
|
5454
5449
|
|
5455
5450
|
self.add_resources(account, tf_resources)
|
5456
5451
|
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc630.dist-info → qontract_reconcile-0.10.1rc632.dist-info}/top_level.txt
RENAMED
File without changes
|