Name | ftf-cli JSON |
Version |
0.3.3
JSON |
| download |
home_page | None |
Summary | Facets Terraform Cli |
upload_time | 2025-07-23 05:53:58 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | None |
keywords |
facets
cli
terraform
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# FTF CLI
FTF CLI is a command-line interface (CLI) tool that facilitates module generation, variable management, validation, and registration in Terraform.
## Key Features
- **Module Generation**: Scaffold Terraform modules with standardized structure
- **Variable Management**: Add and manage input variables with type validation
- **Output Integration**: Wire registered output types as module inputs
- **Validation**: Comprehensive validation for modules and configurations
- **Control Plane Integration**: Seamless authentication and interaction with Facets control plane
## Installation
You can install FTF CLI using pip, pipx, or directly from source.
### Installing with pip / pipx
#### Using pipx (recommended)
```bash
pipx install ftf-cli
```
#### Using pip
```bash
pip install ftf-cli
```
### Installing from source
To install FTF CLI from source, follow these steps:
#### Prerequisites
- Python 3.11 or later
- Virtual environment (recommended)
#### Steps
1. **Clone the repository**:
```bash
git clone https://github.com/Facets-cloud/module-development-cli.git
cd module-development-cli
```
2. **Create a virtual environment** (recommended):
```bash
uv sync
source .venv/bin/activate # On Windows use `.venv\Scripts\activate`
```
3. **Install the package**:
```bash
pip install -e .[dev] # Install with development dependencies
```
## Usage
After successful installation, you can use the `ftf` command to access CLI.
### Commands:
#### Validate Facets
Validate the facets YAML file in the specified directory for correctness and schema compliance.
```bash
ftf validate-facets [OPTIONS] PATH
```
**Arguments**:
- `PATH`: Filesystem path to directory containing the facets YAML file.
**Options**:
- `--filename TEXT`: Name of the facets YAML file to validate (default: facets.yaml).
**Notes**:
- Checks existence and YAML syntax of the specified facets YAML file.
- Validates adherence to Facets schema including spec fields.
- Prints success message if valid; raises error and message if invalid.
#### Generate Module
Generate a new Terraform module structured by specifying intent, flavor, cloud provider, title, and description.
```bash
ftf generate-module [OPTIONS] /path/to/module
```
**Options**:
- `-i, --intent`: (prompt) The intent or purpose of the module.
- `-f, --flavor`: (prompt) The flavor or variant of the module.
- `-c, --cloud`: (prompt) Target cloud provider (e.g. aws, gcp, azure).
- `-t, --title`: (prompt) Human-readable title of the module.
- `-d, --description`: (prompt) Description outlining module functionality.
**Notes**:
- Automatically scaffolds module files based on standard templates.
- Cloud provider selection influences configuration details.
- Module is generated inside the specified path or current directory by default.
#### Add Variable
Add a new input variable to the Terraform module, supporting nested names and types.
```bash
ftf add-variable [OPTIONS] /path/to/module
```
**Options**:
- `-n, --name`: (prompt) Name allowing nested dot-separated variants. Use * for dynamic keys where you want to use regex and pass the regex using --pattern flag For example: 'my_var.*.key'.
- `--title`: (prompt) Title for the variable in facets.yaml.
- `-t, --type`: (prompt) Variable type, supports basic JSON schema types like string, number, boolean, enum.
- `-d, --description`: (prompt) A descriptive text explaining the variable.
- `--options`: (prompt) Comma-separated options used if the variable type is enum.
- `--required`: Optional flag to mark variable as required.
- `--default`: Optional way to provide a default value for the variable.
- `-p, --pattern`: (prompt) Provide comma separated regex for pattern properties. Number of wildcard keys and patterns must match. Eg: '"^[a-z]+$","^[a-zA-Z0-9._-]+$"'
**Notes**:
- Preserves terraform formatting while adding variables.
- Performs type validation before addition.
- Nested variables create the necessary nested structure internally.
- Pattern properties support regex validation for dynamic keys.
#### Validate Directory
Perform validation on Terraform directories including formatting checks and security scans using Checkov.
```bash
ftf validate-directory /path/to/module [OPTIONS]
```
**Options**:
- `--check-only`: Only check formatting; does not make any changes.
- `--skip-terraform-validation`: Skip Terraform validation steps if set to true.
**Notes**:
- Runs `terraform fmt` for formatting verification.
- Runs `terraform init` to ensure initialization completeness (unless skipped).
- Uses Checkov to scan Terraform files for security misconfigurations.
- Designed for fast feedback on module quality and security.
#### Login
Authenticate to a control plane and store credentials under a named profile for reuse.
```bash
ftf login [OPTIONS]
```
**Options**:
- `-c, --control-plane-url`: (prompt) Base URL of the control plane API (must start with http:// or https://).
- `-u, --username`: (prompt) Your login username.
- `-t, --token`: (prompt) Access token or API token (input is hidden).
- `-p, --profile`: (prompt) Profile name to save credentials under (default: "default").
**Notes**:
- URL format is validated before saving.
- Credentials are verified via the control plane API before storage.
- The selected profile becomes the default profile for future commands in the current session.
- Profile selection persists across terminal sessions, so you don't need to specify a profile for each command.
- Allows switching between multiple profiles/environments.
#### Add Input
Add an existing registered output type as an input to your Terraform module.
```bash
ftf add-input [OPTIONS] /path/to/module
```
**Options**:
- `-p, --profile`: (prompt) Profile to use for control plane authentication (default: "default").
- `-n, --name`: (prompt) Name of the input variable to add in facets.yaml and variables.tf.
- `-dn, --display-name`: (prompt) Human-readable display name for the input variable.
- `-d, --description`: (prompt) Description for the input variable.
- `-o, --output-type`: (prompt) The type of registered output to wire as input. Format: @namespace/name (e.g., @outputs/database, @custom/sqs).
**Notes**:
- Updates facets.yaml required inputs and variables.tf accordingly.
- Facilitates parametrization of modules using control plane outputs.
- Supports both default (@outputs) and custom namespaces.
**Example**:
```bash
ftf add-input /path/to/module \
--name queue_connection \
--display-name "SQS Queue Connection" \
--description "Configuration for SQS queue" \
--output-type "@custom/sqs"
```
#### Preview (and Publish) Module
Preview or register a Terraform module with the control plane from a specified directory.
```bash
ftf preview-module /path/to/module [OPTIONS]
```
**Options**:
- `-p, --profile`: (prompt) Profile to authenticate with (default: "default").
- `-a, --auto-create-intent`: Automatically create intent in control plane if it doesn't exist.
- `-f, --publishable`: Marks the module as production-ready and publishable.
- `-g, --git-repo-url`: Git repository URL where the module source code resides.
- `-r, --git-ref`: Git ref, branch, or tag for the module version.
- `--publish`: Flag to publish the module immediately after preview.
- `--skip-terraform-validation`: Skip Terraform validation steps if set to true.
- `--skip-output-write`: Do not update the output type in facets. Set to true only if you have already registered the output type before calling this command.
**Notes**:
- Environment variables such as GIT_REPO_URL, GIT_REF, FACETS_PROFILE can be used for automation or CI pipelines.
- If Git info is absent, module versioning defaults to a local testing version format (e.g. 1.0-{username}).
#### Expose Provider
Expose a Terraform provider as part of the module outputs with configurable name, version, attributes, and output.
```bash
ftf expose-provider [OPTIONS] /path/to/module
```
**Options**:
- `-n, --name`: (prompt) Name to assign to the provider.
- `-s, --source`: (prompt) Provider source URL or address.
- `-v, --version`: (prompt) Version constraint for the provider.
- `-a, --attributes`: (prompt) Comma-separated attributes map with equal sign (e.g., "attribute1=val1,depth.attribute2=val2").
- `-o, --output`: (prompt) Output block to expose the provider under.
**Notes**:
- Supports nested attribute keys using dot notation.
- If no default output exists, one of type intent "default" under facets.yaml will be created.
#### Add Import
Add import declarations to the module to specify resources that should be imported.
```bash
ftf add-import [OPTIONS] /path/to/module
```
Automatically discovers resources in the module and prompts for selecting a resource, naming the import, and specifying if it's required.
**Options**:
- `-n, --name`: The name of the import to be added. If not provided, will prompt interactively.
- `-r, --required`: Flag to indicate if this import is required. Default is True.
- `--resource`: The Terraform resource address to import (e.g., 'aws_s3_bucket.bucket').
- `--index`: For resources with 'count', specify the index (e.g., '0', '1', or '*' for all).
- `--key`: For resources with 'for_each', specify the key (e.g., 'my-key' or '*' for all).
- `--resource-address`: The full resource address to import (e.g., 'azurerm_key_vault.for_each_key_vault[0]'). If provided, runs in non-interactive mode and skips resource discovery.
**Examples**:
```bash
# Interactive mode
ftf add-import /path/to/module
# Non-interactive mode for regular resource
ftf add-import /path/to/module --name key_vault --resource azurerm_key_vault.key_vault
# Non-interactive mode for count resource
ftf add-import /path/to/module --name count_vault --resource azurerm_key_vault.count_key_vault --index 1
# Non-interactive mode for for_each resource
ftf add-import /path/to/module --name for_each_vault --resource azurerm_key_vault.for_each_key_vault --key my-key
# Non-interactive mode with full resource state address
ftf add-import /path/to/module --name for_each_vault --resource-address 'azurerm_key_vault.for_each_key_vault[0]'
```
**Notes**:
- Discovers and lists all resources defined in the module's Terraform files
- Supports resources with count or for_each meta-arguments
- Validates import names and resource addresses
- Updates the facets.yaml file with the import declarations in the format:
```yaml
imports:
- name: s3_bucket
resource_address: aws_s3_bucket.bucket
required: true
```
#### Delete Module
Delete a registered Terraform module from the control plane.
```bash
ftf delete-module [OPTIONS]
```
**Options**:
- `-i, --intent`: (prompt) Intent of the module to delete.
- `-f, --flavor`: (prompt) Flavor of the module.
- `-v, --version`: (prompt) Version of the module.
- `-s, --stage`: (prompt) Deployment stage of the module (choices: "PUBLISHED", "PREVIEW").
- `-p, --profile`: (prompt) Authentication profile to use (default: "default").
#### Get Output Types
Retrieve the output types registered in the control plane for the authenticated profile. Shows both namespace and name for each output type.
```bash
ftf get-output-types [OPTIONS]
```
**Options**:
- `-p, --profile`: (prompt) Profile to authenticate as (default: "default").
**Example Output**:
```
Registered output types:
- @custom/sqs
- @outputs/cache
- @outputs/database
```
#### Get Output Type Details
Retrieve comprehensive details for a specific registered output type from the control plane, including properties and lookup tree.
```bash
ftf get-output-type-details [OPTIONS]
```
**Options**:
- `-o, --output-type`: (prompt) The output type to get details for. Format: @namespace/name (e.g., @outputs/vpc, @custom/sqs).
- `-p, --profile`: (prompt) Profile to use for authentication (default: "default").
**Example Output**:
```
=== Output Type Details: @custom/sqs ===
Name: sqs
Namespace: @custom
Source: CUSTOM
Inferred from Module: true
--- Properties ---
{
"attributes": {
"queue_arn": {"type": "string"},
"queue_url": {"type": "string"}
},
"interfaces": {}
}
--- Lookup Tree ---
{
"out": {
"attributes": {"queue_arn": {}, "queue_url": {}},
"interfaces": {}
}
}
```
#### Register Output Type
Register a new output type in the control plane using a YAML definition file.
```bash
ftf register-output-type YAML_PATH [OPTIONS]
```
**Arguments**:
- `YAML_PATH`: Path to the YAML definition file for the output type.
**Options**:
- `-p, --profile`: Profile name to use, defaults to environment variable FACETS_PROFILE if set, otherwise `default`.
- `--inferred-from-module`: Flag to mark the output type as inferred from a module.
**Notes**:
- The YAML file must include `name` and `properties` fields.
- The name should be in the format `@namespace/name` (e.g., `@outputs/database`, `@custom/sqs`).
- You can include a `providers` section in the YAML to specify provider information.
- Ensures you're logged in before attempting to register the output type.
**Example YAML**:
```yaml
name: "@custom/sqs"
properties:
attributes:
queue_arn:
type: string
queue_url:
type: string
interfaces: {}
```
#### Get Resources
List all Terraform resources in the given module directory.
```bash
ftf get-resources /path/to/module
```
**Arguments**:
- `/path/to/module`: Filesystem path to the directory containing Terraform files.
**Description**:
- Discovers and lists all Terraform resources defined in the module's `.tf` files.
- Shows the resource address and whether it uses `count` or `for_each`.
- Useful for quickly auditing which resources are present in a module.
**Example Output**:
```
Found 3 resources:
- aws_s3_bucket.bucket
- aws_instance.web (with count)
- aws_security_group.sg (with for_each)
```
## Contribution
Feel free to fork the repository and submit pull requests for any feature enhancements or bug fixes.
## License
This project is licensed under the MIT License - see the LICENSE.md file for more details.
Raw data
{
"_id": null,
"home_page": null,
"name": "ftf-cli",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "Facets, CLI, Terraform",
"author": null,
"author_email": "Sanmesh Kakade <sanmesh.kakade@facets.cloud>",
"download_url": "https://files.pythonhosted.org/packages/19/c5/6774fcc65e0f5e2297db3b54f85f4acdb42b9d5bf3df705edab78b1ed472/ftf_cli-0.3.3.tar.gz",
"platform": null,
"description": "# FTF CLI\n\nFTF CLI is a command-line interface (CLI) tool that facilitates module generation, variable management, validation, and registration in Terraform.\n\n## Key Features\n\n- **Module Generation**: Scaffold Terraform modules with standardized structure\n- **Variable Management**: Add and manage input variables with type validation\n- **Output Integration**: Wire registered output types as module inputs\n- **Validation**: Comprehensive validation for modules and configurations\n- **Control Plane Integration**: Seamless authentication and interaction with Facets control plane\n\n## Installation\n\nYou can install FTF CLI using pip, pipx, or directly from source.\n\n### Installing with pip / pipx\n\n#### Using pipx (recommended)\n\n```bash\npipx install ftf-cli\n```\n\n#### Using pip\n\n```bash\npip install ftf-cli\n```\n\n### Installing from source\n\nTo install FTF CLI from source, follow these steps:\n\n#### Prerequisites\n\n- Python 3.11 or later\n- Virtual environment (recommended)\n\n#### Steps\n\n1. **Clone the repository**:\n\n ```bash\n git clone https://github.com/Facets-cloud/module-development-cli.git\n cd module-development-cli\n ```\n\n2. **Create a virtual environment** (recommended):\n\n ```bash\n uv sync\n source .venv/bin/activate # On Windows use `.venv\\Scripts\\activate`\n ```\n\n3. **Install the package**:\n\n ```bash\n pip install -e .[dev] # Install with development dependencies\n ```\n\n## Usage\n\nAfter successful installation, you can use the `ftf` command to access CLI.\n\n### Commands:\n\n#### Validate Facets\n\nValidate the facets YAML file in the specified directory for correctness and schema compliance.\n\n```bash\nftf validate-facets [OPTIONS] PATH\n```\n\n**Arguments**:\n- `PATH`: Filesystem path to directory containing the facets YAML file.\n\n**Options**:\n- `--filename TEXT`: Name of the facets YAML file to validate (default: facets.yaml).\n\n**Notes**:\n- Checks existence and YAML syntax of the specified facets YAML file.\n- Validates adherence to Facets schema including spec fields.\n- Prints success message if valid; raises error and message if invalid.\n\n#### Generate Module\n\nGenerate a new Terraform module structured by specifying intent, flavor, cloud provider, title, and description.\n\n```bash\nftf generate-module [OPTIONS] /path/to/module\n```\n\n**Options**:\n- `-i, --intent`: (prompt) The intent or purpose of the module.\n- `-f, --flavor`: (prompt) The flavor or variant of the module.\n- `-c, --cloud`: (prompt) Target cloud provider (e.g. aws, gcp, azure).\n- `-t, --title`: (prompt) Human-readable title of the module.\n- `-d, --description`: (prompt) Description outlining module functionality.\n\n**Notes**:\n- Automatically scaffolds module files based on standard templates.\n- Cloud provider selection influences configuration details.\n- Module is generated inside the specified path or current directory by default.\n\n#### Add Variable\n\nAdd a new input variable to the Terraform module, supporting nested names and types.\n\n```bash\nftf add-variable [OPTIONS] /path/to/module\n```\n\n**Options**:\n- `-n, --name`: (prompt) Name allowing nested dot-separated variants. Use * for dynamic keys where you want to use regex and pass the regex using --pattern flag For example: 'my_var.*.key'.\n- `--title`: (prompt) Title for the variable in facets.yaml.\n- `-t, --type`: (prompt) Variable type, supports basic JSON schema types like string, number, boolean, enum.\n- `-d, --description`: (prompt) A descriptive text explaining the variable.\n- `--options`: (prompt) Comma-separated options used if the variable type is enum.\n- `--required`: Optional flag to mark variable as required.\n- `--default`: Optional way to provide a default value for the variable.\n- `-p, --pattern`: (prompt) Provide comma separated regex for pattern properties. Number of wildcard keys and patterns must match. Eg: '\"^[a-z]+$\",\"^[a-zA-Z0-9._-]+$\"'\n\n**Notes**:\n- Preserves terraform formatting while adding variables.\n- Performs type validation before addition.\n- Nested variables create the necessary nested structure internally.\n- Pattern properties support regex validation for dynamic keys.\n\n#### Validate Directory\n\nPerform validation on Terraform directories including formatting checks and security scans using Checkov.\n\n```bash\nftf validate-directory /path/to/module [OPTIONS]\n```\n\n**Options**:\n- `--check-only`: Only check formatting; does not make any changes.\n- `--skip-terraform-validation`: Skip Terraform validation steps if set to true.\n\n**Notes**:\n- Runs `terraform fmt` for formatting verification.\n- Runs `terraform init` to ensure initialization completeness (unless skipped).\n- Uses Checkov to scan Terraform files for security misconfigurations.\n- Designed for fast feedback on module quality and security.\n\n#### Login\n\nAuthenticate to a control plane and store credentials under a named profile for reuse.\n\n```bash\nftf login [OPTIONS]\n```\n\n**Options**:\n- `-c, --control-plane-url`: (prompt) Base URL of the control plane API (must start with http:// or https://).\n- `-u, --username`: (prompt) Your login username.\n- `-t, --token`: (prompt) Access token or API token (input is hidden).\n- `-p, --profile`: (prompt) Profile name to save credentials under (default: \"default\").\n\n**Notes**:\n- URL format is validated before saving.\n- Credentials are verified via the control plane API before storage.\n- The selected profile becomes the default profile for future commands in the current session.\n- Profile selection persists across terminal sessions, so you don't need to specify a profile for each command.\n- Allows switching between multiple profiles/environments.\n\n#### Add Input\n\nAdd an existing registered output type as an input to your Terraform module.\n\n```bash\nftf add-input [OPTIONS] /path/to/module\n```\n\n**Options**:\n- `-p, --profile`: (prompt) Profile to use for control plane authentication (default: \"default\").\n- `-n, --name`: (prompt) Name of the input variable to add in facets.yaml and variables.tf.\n- `-dn, --display-name`: (prompt) Human-readable display name for the input variable.\n- `-d, --description`: (prompt) Description for the input variable.\n- `-o, --output-type`: (prompt) The type of registered output to wire as input. Format: @namespace/name (e.g., @outputs/database, @custom/sqs).\n\n**Notes**:\n- Updates facets.yaml required inputs and variables.tf accordingly.\n- Facilitates parametrization of modules using control plane outputs.\n- Supports both default (@outputs) and custom namespaces.\n\n**Example**:\n```bash\nftf add-input /path/to/module \\\n --name queue_connection \\\n --display-name \"SQS Queue Connection\" \\\n --description \"Configuration for SQS queue\" \\\n --output-type \"@custom/sqs\"\n```\n\n#### Preview (and Publish) Module\n\nPreview or register a Terraform module with the control plane from a specified directory.\n\n```bash\nftf preview-module /path/to/module [OPTIONS]\n```\n\n**Options**:\n- `-p, --profile`: (prompt) Profile to authenticate with (default: \"default\").\n- `-a, --auto-create-intent`: Automatically create intent in control plane if it doesn't exist.\n- `-f, --publishable`: Marks the module as production-ready and publishable.\n- `-g, --git-repo-url`: Git repository URL where the module source code resides.\n- `-r, --git-ref`: Git ref, branch, or tag for the module version.\n- `--publish`: Flag to publish the module immediately after preview.\n- `--skip-terraform-validation`: Skip Terraform validation steps if set to true.\n- `--skip-output-write`: Do not update the output type in facets. Set to true only if you have already registered the output type before calling this command.\n\n**Notes**:\n- Environment variables such as GIT_REPO_URL, GIT_REF, FACETS_PROFILE can be used for automation or CI pipelines.\n- If Git info is absent, module versioning defaults to a local testing version format (e.g. 1.0-{username}).\n\n#### Expose Provider\n\nExpose a Terraform provider as part of the module outputs with configurable name, version, attributes, and output.\n\n```bash\nftf expose-provider [OPTIONS] /path/to/module\n```\n\n**Options**:\n- `-n, --name`: (prompt) Name to assign to the provider.\n- `-s, --source`: (prompt) Provider source URL or address.\n- `-v, --version`: (prompt) Version constraint for the provider.\n- `-a, --attributes`: (prompt) Comma-separated attributes map with equal sign (e.g., \"attribute1=val1,depth.attribute2=val2\").\n- `-o, --output`: (prompt) Output block to expose the provider under.\n\n**Notes**:\n- Supports nested attribute keys using dot notation.\n- If no default output exists, one of type intent \"default\" under facets.yaml will be created.\n\n#### Add Import\n\nAdd import declarations to the module to specify resources that should be imported.\n\n```bash\nftf add-import [OPTIONS] /path/to/module\n```\n\nAutomatically discovers resources in the module and prompts for selecting a resource, naming the import, and specifying if it's required.\n\n**Options**:\n- `-n, --name`: The name of the import to be added. If not provided, will prompt interactively.\n- `-r, --required`: Flag to indicate if this import is required. Default is True.\n- `--resource`: The Terraform resource address to import (e.g., 'aws_s3_bucket.bucket').\n- `--index`: For resources with 'count', specify the index (e.g., '0', '1', or '*' for all).\n- `--key`: For resources with 'for_each', specify the key (e.g., 'my-key' or '*' for all).\n- `--resource-address`: The full resource address to import (e.g., 'azurerm_key_vault.for_each_key_vault[0]'). If provided, runs in non-interactive mode and skips resource discovery.\n\n**Examples**:\n```bash\n# Interactive mode\nftf add-import /path/to/module\n\n# Non-interactive mode for regular resource\nftf add-import /path/to/module --name key_vault --resource azurerm_key_vault.key_vault\n\n# Non-interactive mode for count resource\nftf add-import /path/to/module --name count_vault --resource azurerm_key_vault.count_key_vault --index 1\n\n# Non-interactive mode for for_each resource\nftf add-import /path/to/module --name for_each_vault --resource azurerm_key_vault.for_each_key_vault --key my-key\n\n# Non-interactive mode with full resource state address\nftf add-import /path/to/module --name for_each_vault --resource-address 'azurerm_key_vault.for_each_key_vault[0]'\n```\n\n**Notes**:\n- Discovers and lists all resources defined in the module's Terraform files\n- Supports resources with count or for_each meta-arguments\n- Validates import names and resource addresses\n- Updates the facets.yaml file with the import declarations in the format:\n ```yaml\n imports:\n - name: s3_bucket\n resource_address: aws_s3_bucket.bucket\n required: true\n ```\n\n#### Delete Module\n\nDelete a registered Terraform module from the control plane.\n\n```bash\nftf delete-module [OPTIONS]\n```\n\n**Options**:\n- `-i, --intent`: (prompt) Intent of the module to delete.\n- `-f, --flavor`: (prompt) Flavor of the module.\n- `-v, --version`: (prompt) Version of the module.\n- `-s, --stage`: (prompt) Deployment stage of the module (choices: \"PUBLISHED\", \"PREVIEW\").\n- `-p, --profile`: (prompt) Authentication profile to use (default: \"default\").\n\n#### Get Output Types\n\nRetrieve the output types registered in the control plane for the authenticated profile. Shows both namespace and name for each output type.\n\n```bash\nftf get-output-types [OPTIONS]\n```\n\n**Options**:\n- `-p, --profile`: (prompt) Profile to authenticate as (default: \"default\").\n\n**Example Output**:\n```\nRegistered output types:\n- @custom/sqs\n- @outputs/cache\n- @outputs/database\n```\n\n#### Get Output Type Details\n\nRetrieve comprehensive details for a specific registered output type from the control plane, including properties and lookup tree.\n\n```bash\nftf get-output-type-details [OPTIONS]\n```\n\n**Options**:\n- `-o, --output-type`: (prompt) The output type to get details for. Format: @namespace/name (e.g., @outputs/vpc, @custom/sqs).\n- `-p, --profile`: (prompt) Profile to use for authentication (default: \"default\").\n\n**Example Output**:\n```\n=== Output Type Details: @custom/sqs ===\n\nName: sqs\nNamespace: @custom\nSource: CUSTOM\nInferred from Module: true\n\n--- Properties ---\n{\n \"attributes\": {\n \"queue_arn\": {\"type\": \"string\"},\n \"queue_url\": {\"type\": \"string\"}\n },\n \"interfaces\": {}\n}\n\n--- Lookup Tree ---\n{\n \"out\": {\n \"attributes\": {\"queue_arn\": {}, \"queue_url\": {}},\n \"interfaces\": {}\n }\n}\n```\n\n#### Register Output Type\n\nRegister a new output type in the control plane using a YAML definition file.\n\n```bash\nftf register-output-type YAML_PATH [OPTIONS]\n```\n\n**Arguments**:\n- `YAML_PATH`: Path to the YAML definition file for the output type.\n\n**Options**:\n- `-p, --profile`: Profile name to use, defaults to environment variable FACETS_PROFILE if set, otherwise `default`.\n- `--inferred-from-module`: Flag to mark the output type as inferred from a module.\n\n**Notes**:\n- The YAML file must include `name` and `properties` fields.\n- The name should be in the format `@namespace/name` (e.g., `@outputs/database`, `@custom/sqs`).\n- You can include a `providers` section in the YAML to specify provider information.\n- Ensures you're logged in before attempting to register the output type.\n\n**Example YAML**:\n```yaml\nname: \"@custom/sqs\"\nproperties:\n attributes:\n queue_arn:\n type: string\n queue_url:\n type: string\n interfaces: {}\n```\n\n#### Get Resources\n\nList all Terraform resources in the given module directory.\n\n```bash\nftf get-resources /path/to/module\n```\n\n**Arguments**:\n- `/path/to/module`: Filesystem path to the directory containing Terraform files.\n\n**Description**:\n- Discovers and lists all Terraform resources defined in the module's `.tf` files.\n- Shows the resource address and whether it uses `count` or `for_each`.\n- Useful for quickly auditing which resources are present in a module.\n\n**Example Output**:\n```\nFound 3 resources:\n- aws_s3_bucket.bucket\n- aws_instance.web (with count)\n- aws_security_group.sg (with for_each)\n```\n\n## Contribution\n\nFeel free to fork the repository and submit pull requests for any feature enhancements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE.md file for more details.\n",
"bugtrack_url": null,
"license": null,
"summary": "Facets Terraform Cli",
"version": "0.3.3",
"project_urls": {
"Homepage": "https://github.com/Facets-cloud/module-development-cli",
"Repository": "https://github.com/Facets-cloud/module-development-cli"
},
"split_keywords": [
"facets",
" cli",
" terraform"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9e707ce90e9273c41ca9608e18223e744a89e3671614bc29ec7e5a337fc2aa65",
"md5": "45555268cd5aba35014ac430321eda45",
"sha256": "a46ae6e5017c5567c893deade465b22c6718341dff1cb18fbd55ce4578141ccb"
},
"downloads": -1,
"filename": "ftf_cli-0.3.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "45555268cd5aba35014ac430321eda45",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 48779,
"upload_time": "2025-07-23T05:53:57",
"upload_time_iso_8601": "2025-07-23T05:53:57.646358Z",
"url": "https://files.pythonhosted.org/packages/9e/70/7ce90e9273c41ca9608e18223e744a89e3671614bc29ec7e5a337fc2aa65/ftf_cli-0.3.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "19c56774fcc65e0f5e2297db3b54f85f4acdb42b9d5bf3df705edab78b1ed472",
"md5": "42fe660b5ebbacd8f7dcc557bd6d534c",
"sha256": "b33ca2bd4d1572f216ff54dfb2f73cf7a13c850ae6fd4db980073174c1fcee4c"
},
"downloads": -1,
"filename": "ftf_cli-0.3.3.tar.gz",
"has_sig": false,
"md5_digest": "42fe660b5ebbacd8f7dcc557bd6d534c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 63659,
"upload_time": "2025-07-23T05:53:58",
"upload_time_iso_8601": "2025-07-23T05:53:58.488747Z",
"url": "https://files.pythonhosted.org/packages/19/c5/6774fcc65e0f5e2297db3b54f85f4acdb42b9d5bf3df705edab78b1ed472/ftf_cli-0.3.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-23 05:53:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Facets-cloud",
"github_project": "module-development-cli",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ftf-cli"
}