p_terraformer is a CLI that extends terraformer.
The following environments are supported
- Darwin
- Linux
- python version 3.9.x ~ 3.10.1
terraformer must be installed to use p_terraformer. To install terraformer from official sources, please check the following documentation. An installation program is provided in this repository.
python terraformer_install.py
Please refer to the following document for official installation. ref: https://github.com/GoogleCloudPlatform/terraformer
To install using pip, run the following command
$ pip install p-terraformer
ref: https://pypi.org/project/p-terraformer/
To install p_terraformer using setup.py, the following code must be executed.
python setup.py install
You can configure the profile by executing the following command and entering each item The entered information is recorded in .p_terraformer/config.yaml
.
$ p_terraformer profile
---output---
Please enter a profile name >hogehoge
secret manager api_key >hogehoge
secret manager app_key >hogehoge
---example---
profile:
- name: hogehoge
api_key: hogehoge
app_key: hogehoge
- Generate dashboard
p_terraformer datadog aws_secret -p hogehoge --resource dashboard --resource_id hogehoge
Resource can be generated by entering the name of the resource you wish to generate in --resource and entering the corresponding resource id.
※ you must register a secret in the profile
p_terraformer datadog default_secret --api_key hogehoge --app_key hogehoge--resource dashboard --resource_id hogehoge
- Generate sqs
p_terraformer aws --resource sqs --filter aws_sqs_queue=hogehoge --aws_profile=hogehoge
You can output the resource you want to retrieve by entering the name of the resource you want to retrieve in --resource
, the filter in --filter
, and the profile name of the environment you want to retrieve in --aws_profile
.
※The default value for --aws_profile
is default.
Check the terraformer documentation for details on how to obtain this information.
ref: https://github.com/GoogleCloudPlatform/terraformer/blob/master/docs/aws.md