cloud-foundry 0.4.0__tar.gz → 0.4.2__tar.gz
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.
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/PKG-INFO +1 -1
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/__init__.py +1 -1
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/migrations/forget_site_objects.py +31 -2
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/cdn_site_origin.py +5 -3
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/.gitignore +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/LICENSE +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/README.md +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/archive_builder.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/mail_publisher.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/migrations/__init__.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/__init__.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/api_waf.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/cdn.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/cdn_api_origin.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/connection_store.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/custom_domain.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/document_repository.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/domain.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/function.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/idle_reaper.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/publisher.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/python_function.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/queue.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/rest_api.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/site_bucket.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/topic.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/ui_publisher.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/websocket_api.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/pulumi/websocket_function.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/python_archive_builder.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/services/authorization_api/security_lambda.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/services/mail_publisher.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/utils/aws_openapi_editor.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/utils/hash_comparator.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/utils/idle_reaper_client.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/utils/logger.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/utils/names.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/utils/openapi_editor.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/cloud_foundry/utils/websocket_utils.py +0 -0
- {cloud_foundry-0.4.0 → cloud_foundry-0.4.2}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloud-foundry
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: cloud-foundry is a curated set of cloud components that can be used to assemble cloud-based applications.
|
|
5
5
|
Project-URL: Documentation, https://github.com/DanRepik/cloud-foundry
|
|
6
6
|
Project-URL: Source, https://github.com/DanRepik/cloud-foundry
|
|
@@ -11,7 +11,10 @@ Run this once per stack, right before the first `pulumi up` with the new
|
|
|
11
11
|
cloud_foundry. It removes the per-file resources from the Pulumi state only;
|
|
12
12
|
the S3 objects stay where they are, and the next deploy takes them over.
|
|
13
13
|
|
|
14
|
-
python -m cloud_foundry.migrations.forget_site_objects --stack dev [--cwd
|
|
14
|
+
python -m cloud_foundry.migrations.forget_site_objects --stack dev [--cwd <project dir>] [--dry-run]
|
|
15
|
+
|
|
16
|
+
--cwd is the Pulumi project directory (the one holding Pulumi.yaml),
|
|
17
|
+
relative to where you run the command; it defaults to the current directory.
|
|
15
18
|
|
|
16
19
|
The exported state is saved next to the working directory first, so
|
|
17
20
|
`pulumi stack import --file <backup>` puts it back if needed.
|
|
@@ -20,6 +23,7 @@ The exported state is saved next to the working directory first, so
|
|
|
20
23
|
import argparse
|
|
21
24
|
import json
|
|
22
25
|
import os
|
|
26
|
+
import shutil
|
|
23
27
|
import subprocess
|
|
24
28
|
import sys
|
|
25
29
|
import tempfile
|
|
@@ -69,14 +73,39 @@ def _pulumi(args: list[str], cwd: str) -> None:
|
|
|
69
73
|
subprocess.run(["pulumi", *args], cwd=cwd, check=True)
|
|
70
74
|
|
|
71
75
|
|
|
76
|
+
def _project_problem(cwd: str) -> str | None:
|
|
77
|
+
"""Why ``cwd`` can't be used as the Pulumi project directory, if it can't."""
|
|
78
|
+
if not os.path.isdir(cwd):
|
|
79
|
+
return f"{cwd} does not exist"
|
|
80
|
+
if not any(os.path.isfile(os.path.join(cwd, name)) for name in ("Pulumi.yaml", "Pulumi.yml")):
|
|
81
|
+
return f"{cwd} has no Pulumi.yaml"
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
|
|
72
85
|
def main(argv: list[str] | None = None) -> int:
|
|
73
86
|
parser = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
|
|
74
87
|
parser.add_argument("--stack", required=True)
|
|
75
|
-
parser.add_argument(
|
|
88
|
+
parser.add_argument(
|
|
89
|
+
"--cwd",
|
|
90
|
+
default=".",
|
|
91
|
+
help="Pulumi project directory, relative to where you run this (default: current directory)",
|
|
92
|
+
)
|
|
76
93
|
parser.add_argument("--dry-run", action="store_true", help="report only; change nothing")
|
|
77
94
|
args = parser.parse_args(argv)
|
|
78
95
|
|
|
79
96
|
cwd = os.path.abspath(args.cwd)
|
|
97
|
+
problem = _project_problem(cwd)
|
|
98
|
+
if problem:
|
|
99
|
+
print(
|
|
100
|
+
f"{problem}. --cwd must be the Pulumi project directory, relative to "
|
|
101
|
+
f"where you run this command (it defaults to the current directory). "
|
|
102
|
+
f"Nothing was changed.",
|
|
103
|
+
file=sys.stderr,
|
|
104
|
+
)
|
|
105
|
+
return 2
|
|
106
|
+
if shutil.which("pulumi") is None:
|
|
107
|
+
print("The pulumi CLI is not on PATH. Nothing was changed.", file=sys.stderr)
|
|
108
|
+
return 2
|
|
80
109
|
stamp = time.strftime("%Y%m%dT%H%M%S")
|
|
81
110
|
backup = os.path.join(cwd, f"{args.stack}-state-backup-{stamp}.json")
|
|
82
111
|
_pulumi(["stack", "export", "--stack", args.stack, "--file", backup], cwd)
|
|
@@ -119,9 +119,11 @@ class SiteOrigin(pulumi.ComponentResource):
|
|
|
119
119
|
origin_id=self.origin_id,
|
|
120
120
|
origin_access_control_id=origin_access_control.id,
|
|
121
121
|
origin_path=origin_path,
|
|
122
|
-
s3_origin_config
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
# No s3_origin_config: access goes through the origin access
|
|
123
|
+
# control above, and an S3 origin without one gets CloudFront's
|
|
124
|
+
# empty-identity config anyway. Declaring the empty block made
|
|
125
|
+
# every preview show an origins update, because the provider
|
|
126
|
+
# reads that block back as absent.
|
|
125
127
|
)
|
|
126
128
|
|
|
127
129
|
if origin_shield_region:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|