awslabs.terraform-mcp-server 0.0.12__tar.gz → 1.0.1__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.
Potentially problematic release.
This version of awslabs.terraform-mcp-server might be problematic. Click here for more details.
- awslabs_terraform_mcp_server-1.0.1/CHANGELOG.md +19 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/Dockerfile +11 -8
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/PKG-INFO +2 -2
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/README.md +1 -1
- awslabs_terraform_mcp_server-1.0.1/awslabs/__init__.py +16 -0
- awslabs_terraform_mcp_server-1.0.1/awslabs/terraform_mcp_server/__init__.py +17 -0
- awslabs_terraform_mcp_server-1.0.1/awslabs/terraform_mcp_server/impl/resources/__init__.py +25 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/impl/resources/terraform_aws_provider_resources_listing.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/impl/resources/terraform_awscc_provider_resources_listing.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/impl/tools/__init__.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/impl/tools/execute_terraform_command.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/impl/tools/execute_terragrunt_command.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/impl/tools/run_checkov_scan.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/impl/tools/search_aws_provider_docs.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/impl/tools/search_awscc_provider_docs.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/impl/tools/search_specific_aws_ia_modules.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/impl/tools/search_user_provided_module.py +9 -6
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/impl/tools/utils.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/models/__init__.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/models/models.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/scripts/generate_aws_provider_resources.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/scripts/generate_awscc_provider_resources.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/scripts/scrape_aws_terraform_best_practices.py +14 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/server.py +15 -13
- awslabs_terraform_mcp_server-1.0.1/awslabs/terraform_mcp_server/static/__init__.py +36 -0
- awslabs_terraform_mcp_server-1.0.1/docker-healthcheck.sh +26 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/pyproject.toml +1 -1
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/run_tests.sh +8 -5
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/conftest.py +8 -5
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/test_models.py +8 -5
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/test_server.py +10 -56
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/uv.lock +1388 -1388
- awslabs_terraform_mcp_server-0.0.12/CHANGELOG.md +0 -12
- awslabs_terraform_mcp_server-0.0.12/awslabs/__init__.py +0 -2
- awslabs_terraform_mcp_server-0.0.12/awslabs/terraform_mcp_server/__init__.py +0 -3
- awslabs_terraform_mcp_server-0.0.12/awslabs/terraform_mcp_server/impl/resources/__init__.py +0 -11
- awslabs_terraform_mcp_server-0.0.12/awslabs/terraform_mcp_server/static/__init__.py +0 -22
- awslabs_terraform_mcp_server-0.0.12/docker-healthcheck.sh +0 -12
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/.gitignore +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/.pre-commit-config.yaml +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/.python-version +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/static/AWSCC_PROVIDER_RESOURCES.md +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/static/AWS_PROVIDER_RESOURCES.md +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/static/AWS_TERRAFORM_BEST_PRACTICES.md +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/static/MCP_INSTRUCTIONS.md +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/awslabs/terraform_mcp_server/static/TERRAFORM_WORKFLOW_GUIDE.md +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/.gitignore +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/README.md +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/__init__.py +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/test_command_impl.py +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/test_execute_terraform_command.py +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/test_execute_terragrunt_command.py +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/test_parameter_annotations.py +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/test_resources.py +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/test_run_checkov_scan.py +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/test_search_user_provided_module.py +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/test_tool_implementations.py +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/test_utils.py +0 -0
- {awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/test_utils_additional.py +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.0] - 2025-05-26
|
|
9
|
+
|
|
10
|
+
### Removed
|
|
11
|
+
|
|
12
|
+
- **BREAKING CHANGE:** Server Sent Events (SSE) support has been removed in accordance with the Model Context Protocol specification's [backwards compatibility guidelines](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#backwards-compatibility)
|
|
13
|
+
- This change prepares for future support of [Streamable HTTP](https://modelcontextprotocol.io/specification/draft/basic/transports#streamable-http) transport
|
|
14
|
+
|
|
15
|
+
## Unreleased
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- Initial project setup
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
#FROM public.ecr.aws/sam/build-python3.10:1.137.1-20250411084548
|
|
13
|
-
FROM public.ecr.aws/sam/build-python3.10@sha256:
|
|
16
|
+
FROM public.ecr.aws/sam/build-python3.10@sha256:e78695db10ca8cb129e59e30f7dc9789b0dbd0181dba195d68419c72bac51ac1 AS uv
|
|
14
17
|
|
|
15
18
|
# Install the project into `/app`
|
|
16
19
|
WORKDIR /app
|
|
@@ -44,7 +47,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|
|
44
47
|
# Make the directory just in case it doesn't exist
|
|
45
48
|
RUN mkdir -p /root/.local
|
|
46
49
|
|
|
47
|
-
FROM public.ecr.aws/sam/build-python3.10@sha256:
|
|
50
|
+
FROM public.ecr.aws/sam/build-python3.10@sha256:e78695db10ca8cb129e59e30f7dc9789b0dbd0181dba195d68419c72bac51ac1
|
|
48
51
|
|
|
49
52
|
# Place executables in the environment at the front of the path and include other binaries
|
|
50
53
|
ENV PATH="/app/.venv/bin:$PATH:/usr/sbin"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: awslabs.terraform-mcp-server
|
|
3
|
-
Version:
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: An AWS Labs Model Context Protocol (MCP) server for terraform
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Requires-Dist: beautifulsoup4>=4.12.0
|
|
@@ -96,7 +96,7 @@ Here are some ways you can work with MCP across AWS, and we'll be adding support
|
|
|
96
96
|
}
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
or docker after a
|
|
99
|
+
or docker after a successful `docker build -t awslabs/terraform-mcp-server .`:
|
|
100
100
|
|
|
101
101
|
```json
|
|
102
102
|
{
|
|
@@ -81,7 +81,7 @@ Here are some ways you can work with MCP across AWS, and we'll be adding support
|
|
|
81
81
|
}
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
or docker after a
|
|
84
|
+
or docker after a successful `docker build -t awslabs/terraform-mcp-server .`:
|
|
85
85
|
|
|
86
86
|
```json
|
|
87
87
|
{
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
# This file is part of the awslabs namespace.
|
|
16
|
+
# It is intentionally minimal to support PEP 420 namespace packages.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""awslabs.terraform-mcp-server"""
|
|
16
|
+
|
|
17
|
+
__version__ = '0.0.0'
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""Resource implementations for the Terraform expert."""
|
|
16
|
+
|
|
17
|
+
from .terraform_aws_provider_resources_listing import terraform_aws_provider_assets_listing_impl
|
|
18
|
+
from .terraform_awscc_provider_resources_listing import (
|
|
19
|
+
terraform_awscc_provider_resources_listing_impl,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
__all__ = [
|
|
23
|
+
'terraform_aws_provider_assets_listing_impl',
|
|
24
|
+
'terraform_awscc_provider_resources_listing_impl',
|
|
25
|
+
]
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Implementation for terraform_aws_provider_resources_listing resource."""
|
|
2
16
|
|
|
3
17
|
import sys
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Implementation for terraform_awscc_provider_resources_listing resource."""
|
|
2
16
|
|
|
3
17
|
import sys
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Tool implementations for the terraform MCP server."""
|
|
2
16
|
|
|
3
17
|
from .search_user_provided_module import search_user_provided_module_impl
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Implementation of Terraform command execution tool."""
|
|
2
16
|
|
|
3
17
|
import json
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Implementation of Terragrunt command execution tool."""
|
|
2
16
|
|
|
3
17
|
import json
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Implementation of Checkov scan tools."""
|
|
2
16
|
|
|
3
17
|
import json
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Implementation of AWS provider documentation search tool."""
|
|
2
16
|
|
|
3
17
|
import re
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Implementation of AWSCC provider documentation search tool."""
|
|
2
16
|
|
|
3
17
|
import re
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Implementation of specific AWS-IA module search tool for four key modules."""
|
|
2
16
|
|
|
3
17
|
import asyncio
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
|
-
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
"""Implementation of user provided module from the Terraform registry search tool."""
|
|
12
15
|
|
|
13
16
|
import re
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Utility functions for Terraform MCP server tools."""
|
|
2
16
|
|
|
3
17
|
import asyncio
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from .models import (
|
|
2
16
|
ModuleSearchResult,
|
|
3
17
|
TerraformAWSProviderDocsResult,
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
from pydantic import BaseModel, Field
|
|
2
16
|
from typing import Any, Dict, List, Literal, Optional
|
|
3
17
|
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Script to generate AWS provider resources markdown for the Terraform Expert MCP server.
|
|
2
16
|
|
|
3
17
|
This script scrapes the Terraform AWS provider documentation using Playwright
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Script to generate AWSCC provider resources markdown for the Terraform Expert MCP server.
|
|
2
16
|
|
|
3
17
|
This script scrapes the Terraform AWSCC provider documentation using Playwright
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
"""Script to download and extract content from AWS Terraform best practices PDF and save it as markdown."""
|
|
2
16
|
|
|
3
17
|
import io
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
1
15
|
#!/usr/bin/env python3
|
|
2
16
|
"""terraform MCP server implementation."""
|
|
3
17
|
|
|
4
|
-
import argparse
|
|
5
18
|
from awslabs.terraform_mcp_server.impl.resources import (
|
|
6
19
|
terraform_aws_provider_assets_listing_impl,
|
|
7
20
|
terraform_awscc_provider_resources_listing_impl,
|
|
@@ -420,18 +433,7 @@ async def terraform_aws_best_practices() -> str:
|
|
|
420
433
|
|
|
421
434
|
def main():
|
|
422
435
|
"""Run the MCP server with CLI argument support."""
|
|
423
|
-
|
|
424
|
-
parser.add_argument('--sse', action='store_true', help='Use SSE transport')
|
|
425
|
-
parser.add_argument('--port', type=int, default=8888, help='Port to run the server on')
|
|
426
|
-
|
|
427
|
-
args = parser.parse_args()
|
|
428
|
-
|
|
429
|
-
# Run server with appropriate transport
|
|
430
|
-
if args.sse:
|
|
431
|
-
mcp.settings.port = args.port
|
|
432
|
-
mcp.run(transport='sse')
|
|
433
|
-
else:
|
|
434
|
-
mcp.run()
|
|
436
|
+
mcp.run()
|
|
435
437
|
|
|
436
438
|
|
|
437
439
|
if __name__ == '__main__':
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
from importlib import resources
|
|
16
|
+
|
|
17
|
+
with (
|
|
18
|
+
resources.files('awslabs.terraform_mcp_server.static')
|
|
19
|
+
.joinpath('MCP_INSTRUCTIONS.md')
|
|
20
|
+
.open('r', encoding='utf-8') as f
|
|
21
|
+
):
|
|
22
|
+
MCP_INSTRUCTIONS = f.read()
|
|
23
|
+
|
|
24
|
+
with (
|
|
25
|
+
resources.files('awslabs.terraform_mcp_server.static')
|
|
26
|
+
.joinpath('TERRAFORM_WORKFLOW_GUIDE.md')
|
|
27
|
+
.open('r', encoding='utf-8') as f
|
|
28
|
+
):
|
|
29
|
+
TERRAFORM_WORKFLOW_GUIDE = f.read()
|
|
30
|
+
|
|
31
|
+
with (
|
|
32
|
+
resources.files('awslabs.terraform_mcp_server.static')
|
|
33
|
+
.joinpath('AWS_TERRAFORM_BEST_PRACTICES.md')
|
|
34
|
+
.open('r', encoding='utf-8') as f
|
|
35
|
+
):
|
|
36
|
+
AWS_TERRAFORM_BEST_PRACTICES = f.read()
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
|
+
#
|
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
# you may not use this file except in compliance with the License.
|
|
7
|
+
# You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
|
|
17
|
+
if [ "$(lsof +c 0 -p 1 | grep -e "^awslabs\..*\s1\s.*\sunix\s.*socket$" | wc -l)" -ne "0" ]; then
|
|
18
|
+
echo -n "$(lsof +c 0 -p 1 | grep -e "^awslabs\..*\s1\s.*\sunix\s.*socket$" | wc -l) awslabs.* streams found";
|
|
19
|
+
exit 0;
|
|
20
|
+
else
|
|
21
|
+
echo -n "Zero awslabs.* streams found";
|
|
22
|
+
exit 1;
|
|
23
|
+
fi;
|
|
24
|
+
|
|
25
|
+
echo -n "Never should reach here";
|
|
26
|
+
exit 99;
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
2
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
5
|
-
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
# you may not use this file except in compliance with the License.
|
|
6
|
+
# You may obtain a copy of the License at
|
|
6
7
|
#
|
|
7
8
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
9
|
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
# See the License for the specific language governing permissions and
|
|
14
|
+
# limitations under the License.
|
|
12
15
|
|
|
13
16
|
# Script to run tests for the Terraform MCP Server
|
|
14
17
|
|
{awslabs_terraform_mcp_server-0.0.12 → awslabs_terraform_mcp_server-1.0.1}/tests/conftest.py
RENAMED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License")
|
|
4
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
5
6
|
#
|
|
6
7
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
7
8
|
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
11
14
|
|
|
12
15
|
"""Test fixtures for the terraform-mcp-server tests."""
|
|
13
16
|
|