lm-cloud-sync 2.0.2__tar.gz → 2.0.4__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.
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/.env.example +2 -1
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/PKG-INFO +1 -1
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/pyproject.toml +1 -1
- lm_cloud_sync-2.0.4/src/lm_cloud_sync/__init__.py +8 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/cli/main.py +1 -1
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/core/config.py +2 -1
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/azure/discovery.py +1 -1
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/azure/groups.py +45 -1
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/tests/unit/test_cli.py +2 -1
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/uv.lock +1 -1
- lm_cloud_sync-2.0.2/src/lm_cloud_sync/__init__.py +0 -3
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/.gitignore +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/.python-version +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/CHANGELOG.md +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/LICENSE +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/README.md +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/docs/cli-guide.md +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/docs/gcp-spec.md +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/docs/lm-cloud-sync-v2-spec.md +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/docs/publishing.md +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/cli/__init__.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/cli/aws.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/cli/azure.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/cli/gcp.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/core/__init__.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/core/exceptions.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/core/lm_client.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/core/models.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/__init__.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/aws/__init__.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/aws/auth.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/aws/discovery.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/aws/groups.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/aws/provider.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/azure/__init__.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/azure/provider.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/base.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/gcp/__init__.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/gcp/discovery.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/gcp/groups.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/providers/gcp/provider.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/src/lm_cloud_sync/py.typed +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/README.md +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/examples/gcp-only/main.tf +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/examples/gcp-only/projects.yaml.example +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/examples/gcp-only/terraform.tfvars.example +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/examples/gcp-only/variables.tf +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/aws/main.tf +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/aws/outputs.tf +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/aws/scripts/create_integration.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/aws/scripts/delete_integration.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/aws/variables.tf +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/azure/README.md +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/azure/main.tf +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/azure/outputs.tf +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/azure/scripts/export-credentials.sh +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/azure/variables.tf +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/gcp/main.tf +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/gcp/outputs.tf +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/gcp/scripts/create_integration.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/gcp/scripts/delete_integration.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/gcp/variables.tf +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/tests/__init__.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/tests/conftest.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/tests/integration/__init__.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/tests/unit/__init__.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/tests/unit/test_aws_auth.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/tests/unit/test_aws_discovery.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/tests/unit/test_aws_groups.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/tests/unit/test_azure_discovery.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/tests/unit/test_azure_groups.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/tests/unit/test_lm_client.py +0 -0
- {lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/tests/unit/test_models.py +0 -0
|
@@ -46,9 +46,10 @@ AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key
|
|
|
46
46
|
|
|
47
47
|
# Azure Service Principal credentials
|
|
48
48
|
# The service principal needs 'Reader' role at subscription or management group level
|
|
49
|
+
# Create via: Azure Portal > App registrations > Certificates & secrets > New client secret
|
|
49
50
|
AZURE_TENANT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
|
50
51
|
AZURE_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
|
51
|
-
AZURE_CLIENT_SECRET=
|
|
52
|
+
AZURE_CLIENT_SECRET=your_client_secret_value
|
|
52
53
|
|
|
53
54
|
# Optional: Specific subscription ID (if not using auto-discovery)
|
|
54
55
|
# AZURE_SUBSCRIPTION_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lm-cloud-sync
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.4
|
|
4
4
|
Summary: Multi-cloud automation tool for LogicMonitor integrations. GCP support in v2.0, AWS/Azure coming soon.
|
|
5
5
|
Project-URL: Homepage, https://github.com/ryanmat/lm-cloud-sync
|
|
6
6
|
Project-URL: Repository, https://github.com/ryanmat/lm-cloud-sync
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Description: LM Cloud Sync package initialization.
|
|
2
|
+
# Description: Exports version from package metadata.
|
|
3
|
+
|
|
4
|
+
"""LM Cloud Sync - Multi-cloud automation for LogicMonitor integrations."""
|
|
5
|
+
|
|
6
|
+
from importlib.metadata import version
|
|
7
|
+
|
|
8
|
+
__version__ = version("lm-cloud-sync")
|
|
@@ -143,7 +143,7 @@ sync:
|
|
|
143
143
|
group_name_template: "{provider} - {resource_id}"
|
|
144
144
|
custom_properties:
|
|
145
145
|
"lm.cloud.managed_by": "lm-cloud-sync"
|
|
146
|
-
|
|
146
|
+
# lm.cloud.version is set automatically
|
|
147
147
|
"""
|
|
148
148
|
output_path = Path(output)
|
|
149
149
|
if output_path.exists():
|
|
@@ -10,6 +10,7 @@ import yaml
|
|
|
10
10
|
from pydantic import BaseModel, Field, SecretStr, field_validator, model_validator
|
|
11
11
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
12
12
|
|
|
13
|
+
from lm_cloud_sync import __version__
|
|
13
14
|
from lm_cloud_sync.core.exceptions import ConfigurationError
|
|
14
15
|
|
|
15
16
|
|
|
@@ -133,7 +134,7 @@ class SyncConfig(BaseModel):
|
|
|
133
134
|
custom_properties: dict[str, str] = Field(
|
|
134
135
|
default_factory=lambda: {
|
|
135
136
|
"lm.cloud.managed_by": "lm-cloud-sync",
|
|
136
|
-
"lm.cloud.version":
|
|
137
|
+
"lm.cloud.version": __version__,
|
|
137
138
|
},
|
|
138
139
|
description="Custom properties for all groups",
|
|
139
140
|
)
|
|
@@ -151,7 +151,7 @@ class AzureSubscriptionDiscovery:
|
|
|
151
151
|
resource_id=sub.subscription_id,
|
|
152
152
|
display_name=sub.display_name or sub.subscription_id,
|
|
153
153
|
status=state,
|
|
154
|
-
tenant_id=
|
|
154
|
+
tenant_id=self._tenant_id or "",
|
|
155
155
|
metadata={"subscription_policies": policies},
|
|
156
156
|
)
|
|
157
157
|
subscriptions.append(subscription)
|
|
@@ -155,7 +155,51 @@ def _build_azure_group_payload(
|
|
|
155
155
|
) -> dict[str, Any]:
|
|
156
156
|
"""Build the API payload for creating an Azure device group."""
|
|
157
157
|
regions = regions or ["eastus", "westus2"]
|
|
158
|
-
|
|
158
|
+
# Enable all Azure services by default for comprehensive monitoring
|
|
159
|
+
services = services or [
|
|
160
|
+
"APIMANAGEMENT",
|
|
161
|
+
"APPLICATIONGATEWAY",
|
|
162
|
+
"APPSERVICE",
|
|
163
|
+
"AUTOMATIONACCOUNT",
|
|
164
|
+
"BATCHACCOUNT",
|
|
165
|
+
"CDNPROFILE",
|
|
166
|
+
"COGNITIVESERVICES",
|
|
167
|
+
"CONTAINERINSTANCE",
|
|
168
|
+
"CONTAINERREGISTRY",
|
|
169
|
+
"COSMOSDB",
|
|
170
|
+
"DATABRICKS",
|
|
171
|
+
"DATAFACTORY",
|
|
172
|
+
"DATALAKEANALYTICS",
|
|
173
|
+
"DATALAKESTORE",
|
|
174
|
+
"EVENTGRID",
|
|
175
|
+
"EVENTHUB",
|
|
176
|
+
"EXPRESSROUTE",
|
|
177
|
+
"FIREWALL",
|
|
178
|
+
"FRONTDOOR",
|
|
179
|
+
"FUNCTIONS",
|
|
180
|
+
"HDINSIGHT",
|
|
181
|
+
"IOTHUB",
|
|
182
|
+
"KEYVAULT",
|
|
183
|
+
"KUSTO",
|
|
184
|
+
"LOADBALANCER",
|
|
185
|
+
"LOGICAPPS",
|
|
186
|
+
"MARIADB",
|
|
187
|
+
"MYSQL",
|
|
188
|
+
"NOTIFICATIONHUB",
|
|
189
|
+
"POSTGRESQL",
|
|
190
|
+
"REDISCACHE",
|
|
191
|
+
"SEARCHSERVICE",
|
|
192
|
+
"SERVICEBUS",
|
|
193
|
+
"SIGNALR",
|
|
194
|
+
"SQLDATABASE",
|
|
195
|
+
"SQLMANAGEDINSTANCE",
|
|
196
|
+
"STORAGEACCOUNT",
|
|
197
|
+
"STREAMANALYTICS",
|
|
198
|
+
"SYNAPSE",
|
|
199
|
+
"VIRTUALMACHINE",
|
|
200
|
+
"VIRTUALMACHINESCALESET",
|
|
201
|
+
"VPNGATEWAY",
|
|
202
|
+
]
|
|
159
203
|
custom_properties = custom_properties or {}
|
|
160
204
|
|
|
161
205
|
name = name_template.format(
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import pytest
|
|
4
4
|
from click.testing import CliRunner
|
|
5
5
|
|
|
6
|
+
from lm_cloud_sync import __version__
|
|
6
7
|
from lm_cloud_sync.cli.main import main
|
|
7
8
|
|
|
8
9
|
|
|
@@ -18,7 +19,7 @@ class TestMainCLI:
|
|
|
18
19
|
"""Test --version flag."""
|
|
19
20
|
result = runner.invoke(main, ["--version"])
|
|
20
21
|
assert result.exit_code == 0
|
|
21
|
-
assert
|
|
22
|
+
assert __version__ in result.output
|
|
22
23
|
|
|
23
24
|
def test_help(self, runner: CliRunner) -> None:
|
|
24
25
|
"""Test --help flag."""
|
|
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
|
{lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/examples/gcp-only/projects.yaml.example
RENAMED
|
File without changes
|
{lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/examples/gcp-only/terraform.tfvars.example
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/aws/scripts/create_integration.py
RENAMED
|
File without changes
|
{lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/aws/scripts/delete_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/azure/scripts/export-credentials.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/gcp/scripts/create_integration.py
RENAMED
|
File without changes
|
{lm_cloud_sync-2.0.2 → lm_cloud_sync-2.0.4}/terraform/modules/gcp/scripts/delete_integration.py
RENAMED
|
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
|