Saravanan666/pypi-org huggingface dataset:
Package: terraform-provider-freebox
WARNING, this project is in an early stage; you should probably not use it yet.terraform-provider-freeboxis aTerraform(0.12)providerfor configuringFreeboxes(the xDSL/FTTH modems provided by the French ISPFree).This modem provides aconfiguration GUIfor NAT configuration, port forwarding, static DHCP leases, etc.
and aconfiguration APIwith the same capabilities. (The GUI uses the API).This provider uses the same API to let you configure your Freebox using Terraform’sIaCapproach.It’s licensed under theMIT license.
It’s available on thePython package index.
Itsdocumentationand itssource codeare on GitHub.Questions? Remarks? Bugs? Want to contribute?Open an issue!Quick startInstallationInstall from PyPI:$ pip install terraform-provider-freeboxConfigurationThe configuration API provided by the Freebox uses atokenfor authentication.You first need to obtain a token (you’ll have to do that only once).
Run the following command and follow its instructions.
You’ll have to click on your Freebox’ touch display.$ terraform-provider-freebox create-tokenAfter creating the token, it will give you aprovidersection to copy-paste in your Terraform
configuration files. It should look like:provider freebox {
    app_id = "terraform"
    app_token = "9m2KFLflttfuk1h52aiQvna@LWwk%02qPN4Ah3euZpT7YjP!lekb1MmfWR9qL50r"
}You are responsible for keeping this token safe.
If you lose it, you’ll have to create a new one.You are responsible for keeping this token secret.
Ill-intentioned people might use it to hack your network and devices.Permissions setup@todo Motivate why permissions have to be added manually.
@todo Describe how to add permissions.
@todo List what permissions must be added for each datasource and resource.First test: get your public IP addressAdd the following to your Terraform configuration:data freebox_connection_status connection_status {}

output connection_ipv4 {
    value = data.freebox_connection_status.connection_status.ipv4
}Then runterraform initandterraform plan.
The later should display something like:Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Outputs:

connection_ipv4 = 82.65.16.120Data sourcesfreebox_connection_statusCallsGET /api/v4/connection/and returns attributes described inConnectionStatus.
Package: terraform_usage
OverviewA Python module to call the Terraform Cloud API and retrieve data for total and applied Runs of Workspaces.UsageInstallation:pip3installterraform_usage# orpython3-mpipinstallterraform_usageUsage instructions are in the script built-in help document. Run the following to see options and default parameters.Bash:python</oath/to>/terraform_usage-hPython:importterraform_usageastfuhelp(tfu)Execution example:python</path/to>/terraform_usage-oabdahmad-t$TFE_TOKEN-k"*abdahmad-*"-madvanced-fabdahmad.csv-s2023-11-01-e2023-11-30Runparameters:Organization:abdahmadKeyword:*abdahmad-*Filename:abdahmad.csvStartdate:2023-11-01Enddate:2023-11-30Mode:advancedAPIURL:https://app.terraform.io/api/v2Pagesize:50Delay:1.0-------Gettingpage1ofWorkspaces.Found3Workspaces.GettingRundataforWorkspaceids-aws-abdahmad-dev.Gettingpage1ofRuns.GettingRundataforWorkspaceids-aws-abdahmad-prod.Gettingpage1ofRuns.GettingRundataforWorkspaceids-aws-abdahmad-test.Gettingpage1ofRuns.CreatingCSVfileabdahmad.csv.Writingdatatoabdahmad.csv.Output in CSV file example:workspace,all_runs,successful_applies,total_time
abdahmad-dev,4,0,53
abdahmad-prod,0,0,0
abdahmad-test,0,0,0Execution ModesbasicFunctionGet total number of Runs and successful Applies for all time.Available filtersWorkspace name patternPros and consFaster executionLess detailsadvancedFunctionGet total number of Runs, successful Applies, and total Run time.Available filtersWorkspace name patternStart dateEnd datePros and consPotentially slower execution for a large number of Workspaces and Runs.More detailsError HandlingError: Skipping run due to missing attribute(s).A Run is missing a timestamp for a status. Normally caused by Runs stuck in Pending state, which should be discarded if they aren’t meant to complete, successfully or otherwise.Error: One or more Python exceptions.Multiple possible causes. One of the most common is due to the script hitting the Terraform Cloud API rate limit (30 requests per second). There is a safeguard that slows down execution to avoid this.API Documentationhttps://developer.hashicorp.com/terraform/cloud-docs/api-docs
Package: terraform-utils
Terraform UtilsThis project provides a helper command intended to be used withterraformandterragruntfor applications hosted on AWS. The utility is available onpypiand requires Python 3.6.1+.One of the ways terragrunt helps keep infrastructure code DRY is by injecting the remote state configuration to the current module. Thetf-utilcommand generates names for the terraform state bucket, object, and lock table based on the protect structure.# modules/app/main.tfterraform{required_version=">= 0.12"# The configuration for this backend will be filled in by Terragruntbackend"s3"{}}Project StructureIf you are using terragrunt use two repositories to separate your live configuration from your modules. Here's what the tree structure for the live repo looks like. Within the root there are two files meant forcommon valuesandremote state management. The first level of folders correspond to each environment you want to create, i.e dev, qa, and prd. The nested folders represent individual constructs within an environment. The resources within a construct share the same terraform state and are managed together..
├── common.tfvars
├── dev
│   ├── app
│   │   └── terragrunt.hcl
│   ├── iam
│   │   └── terragrunt.hcl
│   └── network
│       └── terragrunt.hcl
└── terragrunt.hclExample Usage$ pip install terraform-utils
$ cd path/to/live/repo
# verifiy content of common.tfvars
$ cd dev/network
$ tf-util -c bucket
example-terraformstate-dev-company
$ tf-util -c object
app/terraform.tfstate
$ tf-util -c table
example-terraformlock-dev-companyCode QualityRun the following commands to analyze the project with sonar.dockerrun-d--namesonarqube-p9000:9000sonarqube
pipinstallcoverage
nosetests--with-xunit--with-coverage--cover-xml
sonar-scanner-Dproject.settings=cicd/sonar-project.properties
Package: terraformvspherevm
terraformvspherevmThis tool create and delete machine with terraform on vSphere infrastructure.System Requirementspython3terraformInstallationpip install terraformvspherevmDevelopUsageCommand lineUsage$terraformvspherevm--help
usage:terraformvspherevm[-h]--action{create,destroy}--datacenterDATACENTER--datastoreDATASTORE--poolPOOL--folderFOLDER--templateTEMPLATE--guestidGUESTID--nameNAME[--nicNIC][--ipIP][--cidrCIDR][--gatewayGATEWAY]--cpuCPU--ramRAM[--diskDISK][--dnsDNS]--esxhostESXHOST--esxuserESXUSER--esxpassvarESXPASSVAR--domainDOMAIN--timezoneTIMEZONE[-debug]ManagevSphereVirtualMachines

optionalarguments:-h,--helpshowthishelpmessageandexit--action{create,destroy}ActiontoExecuteagainstvSphere--datacenterDATACENTERESXiDatacenter--datastoreDATASTOREESXiDatastore--poolPOOLESXiResourcePool--folderFOLDERESXiVMFolder--templateTEMPLATETemplateName--guestidGUESTIDGuestID--nameNAMEVirtualMachineName--nicNICNetworkInterface.RepeatoptionforseveralNICs--ipIPNICIPaddress.RepeatoptionforseveralNICs--cidrCIDRNICCIDR.RepeatoptionforseveralNICs--gatewayGATEWAYDefaultgateway--cpuCPUCPUs--ramRAMMemory--diskDISKAdditionnaldiskinGB.Repeatoptionforseveraldisks--dnsDNSDNSserver--esxhostESXHOSTESXihost--esxuserESXUSERESXiUsername--esxpassvarESXPASSVAREnvironmentvariablethatcontainESXipassword--domainDOMAINDNSdomain--timezoneTIMEZONETimeZone-debugVerboseOutput

WhenyouwanttodestroyaVM,tfstatefileisnotrequiredExamplesCreate a VMterraformvspherevm--nameterrascript-test--datacenter"DC"--datastore"MyDatastore"\--pool"ressource_pool"--template"rhel-7.5-vmw6.0"--guestid"rhel7_64Guest"--nicDvP_Nmae\--ip10.0.123.123--cidr24--gateway10.0.123.1--cpu1--ram1024--disk10--dns10.0.123.50\--dns10.0.123.100--esxhostesxhost.domain.com--esxuser"esxusername"--folder"terraformed"\--domainmy.domaon--timezone"Etc/UTC"--esxpassvarESXPASS--actioncreateDestroy a VMterraformvspherevm--nameterrascript-test--datacenter"DC"--datastore"MyDatastore"\--pool"ressource_pool"--template"rhel-7.5-vmw6.0"--guestid"rhel7_64Guest"--cpu1\--ram1024--esxhostesxhost.domain.com--esxuser"esxusername"--folder"terraformed"\--esxpassvarESXPASS--actiondestroyIn Python CodefromterraformvspherevmimportTerraformVMvmProperties={'name':'myVM',...}tvm=TerraformVM()tvm.addVirtualMachine(vmProperties)tvm.createVM('myVM')tvm.destroyVM('myVM')DevelopmentVirtualenv and dependenciespython-mvenvvenvsource./venv/bin/activate
python-mpipinstall-rrequirements.txtRun command$python
Python3.7.3(v3.7.3:ef4ec6ed12,Mar252019,22:22:05)[MSCv.191664bit(AMD64)]onwin32
Type"help","copyright","credits"or"license"formoreinformation.
>>>importterraformvm
>>>terraformvm.main(['--help'])Buildpythonsetup.pysdistbdist_wheelUpload PyPitwineuploaddist/*TODOLISTCode documentationarguments validationError management
Package: terragen
terragenTerragen is a framework for generating and automatically applying Terraform modules to simplify the management of sophisticated Cloud ArchitecturesKey FeaturesSimplify the creation and destruction of infra across multiple accounts and regions, using one commandFine grained CLI control, all config elements can be overridden on the CLIView generated Terraform files before they are applied.  Each run creates a timestamped output directoryControl common and app specific infra separately.  Infra that is shared, eg VPCs, Databases can be controlled separately but still referenced by app specific infraCreate default config files you can "sub-class" for specific implementations, allows you to enforce config patterns across your estateBoiler plate Terraform files, like config, tfvars automatically generatedVariable interpolation.  You can lookup values from other config files.InstallingTerragen can be installed via pip:pip install terragenReadTheDocsFull details on configuring and running Terragen on ReadTheDocsTerragen WorkspaceTerragen expects to be run in its own workspace containing its configuration and the Terraform modules you want to configure and apply.Example Workspace is available hereDemo CommandsOnce configured as defined in docs, Terragen is very powerful.  Below we demonstrate some commandsApplying a Named ConfigTerragen lets you define multiple apps and configs, just apply them by nameterragen --config-dir ./config --config-name sandboxSpecifying the environment we want to deploy toTerragen lets you create the same infrastructure across multiple accounts by supplying the environment you want to deploy toterragen --config-dir ./config build.environment=testDebuggingValidate and resolve your config before you run it.terragen -cd ./config --cfg job --resolveVerbose debuggingYou can enable verbose debug logging by passing the following:terragen -cd ./config hydra.verbose=true
Package: terragraph
A package to help vizualise output from terraform graph as an svg fileFree software: MIT licenseDocumentation:https://terragraph.readthedocs.io.OverviewThe idea behind this is to choose a node on a terraform dependency graph and be able to highlight all the preceding or
successor edges or both, recursively.Terraform is pretty good at calculating dependencies however sometimes there are casues where terraform cannot know. or
where users don’t realise how terraform generates dependencies. This can lead to race conditions where running the first
time fails but running the second time works. A prime example of this is when we pass an output of module A as an input
of module B. In most cases users assume that outputs of module A will not be available until all resources in the module
have finished. However, this is not the case. Terraform will start running module B as soon as the output in module A is
available even when other resources in module A are not finished but module B expects them to be.Generating a terraform graph is easy. However, these graphs can get very large very quickly. So trying to follow and
understand the dependencies of one resource in relation to other resources can get complicated. This project attempts to
solve that by taking the output from aterraform graphcommand and selecting a specific node to highlight dependenices.
it provides a HighlightingMode to allow the user to decide if they want to see all the resources the node depends on, all
the resources that depend on this node, or both.UsageCurrently, this is pretty raw, it just runs at the command line taking the DOT format file and the node name to highlight.
By default it will highlight allPRECEDINGedges. These are the things that must be completed before this node can
start. It also supports passing the mode as a flag. The modes aremode flagsValueDescriptionPRECEDINGHighlights all preceding edges to this node. This is all things that needs to complete before this node startSUCCESSORHighlights all successor edges from this node. This is all things that cannot start until this node is completedALLThis applies both PRECEDING and SUCCESSOR modes to highlight the full up and down dependency tree for the nodeterragraph--file-namedocs/assets/graph.dot--node-name'"[root] module.mod2.random_pet.this (expand)"'ColorednodeSVGfilegenerated:docs/assets/graph.dot.svgThe above will create an SVG file with the preceding edges highlighted.
Package: terragrunt-source
Project descriptionA Terragrunt rapid development tool to simplify overriding thesourceparameter in aterraform.tfvarsfile.Introductionterragrunt-sourceis a simple script that parses the source
line from theterraform.tfvarsfile in the current working
directory producing a path to a local source tree that can be used
by terragrunt during development. The path to the local source tree
is looked up in the environment variableTERRAGRUNT_DEFAULT_MODULES_REPO.This is best illustrated be an example. If you are in a directory
that contains aterraform.tfvarsfile with the following content:terragrunt = {
  include {
    path = "${find_in_parent_folders()}"
  }

  terraform {
    source = "git::git@github.com:org/repo.git//lambda?ref=v0.6.2"
  }
}And ifTERRAGRUNT_DEFAULT_MODULES_REPOis set to/usr/src/modulesthen then we expect the following output:$ terragrunt-source
/usr/src/modules//lambdaThen we can use terragrunt like so:$ terragrunt plan --terragrunt-source `terragrunt-source`Another way this can be run is as follows:$ TERRAGRUNT_SOURCE=`terragrunt-source` terragrunt planQuick startInstall terragrunt-source:$ pip install terragrunt-sourceAppend the following to your~/.bashrc:export TERRAGRUNT_DEFAULT_MODULES_REPO=/path/to/your/checked/out/code

terragrunt-source() {
    TERRAGRUNT_SOURCE=$($(which terragrunt-source)) terragrunt $@
}Reload your~/.bashrc:$ source ~/.bashrcChange to a Terragrunt configuration directory:$ terragrunt-source plan
Package: terraincache
terraincacheA (yet another) basic Python script for downloading and accessingMapzen Terrain Tilesgeotiffs from AWS. Designed to integrate withrasterioand to provide a familiar command line tool for quick reprojection of downloads.Installationpip install terraincacheSet theTERRAINCACHEenvironment variable to save typing:export TERRAINCACHE=/users/snorris/Data/terrain-tilesUsagePython modulefrom matplotlib import pyplot as plt
import rasterio

from terraincache import TerrainTiles

bounds =[-125.2714, 51.3706, -125.2547, 51.3768]

# Initialize with bounds and zoom of interest
tt = TerrainTiles(bounds, 11)

# load to numpy array
array = tt.load()

# plot the array directly
plt.imshow(array, cmap='terrain', extent=bounds)Dump to file and plot the array usingrasterio.plot.show()(for correct axis labels):tt.save(out_file="dem.tif")
with rasterio.open("dem.tif", "r") as src:
    fig, ax = plt.subplots()
    rasterio.plot.show(src, ax=ax, title='terrain-tiles', cmap="terrain")CLI$ terraincache --help
Usage: terraincache [OPTIONS]

  Write terrain tiles to geotiff

Options:
  -o, --out_file, --out-file PATH
                                  Output file name/path
  --bounds TEXT                   Bounds: "left bottom right top" or "[left,
                                  bottom, right, top]".  [required]
  -z, --zoom INTEGER              Web map zoom level  [required]
  -p, --cache-dir, --cache_dir TEXT
                                  Path to cache folder
  -tr, --resolution FLOAT         Output dataset target resolution in meters
                                  (square pixels)
  --bounds-crs, --bounds_crs TEXT
                                  CRS of provided bounds
  --dst-crs, --dst_crs TEXT       Target coordinate reference system.
  -r, --resampling_algorithm [bilinear|nearest|cubic|cubicspline|lanczos|average|mode]
                                  GDAL resampling algorithm
  -v, --verbose                   Increase verbosity.
  -q, --quiet                     Decrease verbosity.
  --help                          Show this message and exit.For example, create a geotiff around the summit of Mt Fairweather (at BC / AK border) that aligns with the BC TRIM DEM.  Note that this is almost certainly upsampling the data available, see below link to review source resolutions.terraincache \
  --bounds "336637.5, 1597112.5, 346637.5, 1607112.5" \
  --bounds-crs EPSG:3005 \
  --zoom 11 \
  -tr 25 \
  -r bilinear \
  -o dem.tifData sourcesSee thedata sources reference documentCredits / other implementationsterrain-tilesMapzen provided scriptplanetutilsdemelevatr
Package: terramagic
Terramagic CLITerramagic is a command-line interface tool that makes it easy to create and manage Terraform projects.MotivationCreating a new Terraform project from scratch can be time-consuming and error-prone. With Terramagic, you can quickly generate a template for your project and customize it to your needs.RequirementsPython 3.9 or higherInstallationYou can easily install Terramagic using pip:pip3installterramagicUsageCreating a new projectTo create a new Terraform project, use the create command:terramagiccreate--name<project_name>For example, to create a project called "infra" automatically 3 environments are created ("development", "staging" and "production") and respective tfvars, run:terramagiccreate--nameinfraThis will generate a new directory called "infra" with the following structure:infra
├── backend.tf
├── environments
│   ├── development
│   │   └── development.tfvars
│   ├── production
│   │   └── production.tfvars
│   └── staging
│       └── staging.tfvars
├── main.tf
├── main.tfvars
├── modules
│   ├── cluster
│   │   ├── main.tf
│   │   ├── outputs.tf
│   │   └── variables.tf
│   ├── instance
│   │   ├── main.tf
│   │   ├── outputs.tf
│   │   └── variables.tf
│   └── vpc
│       ├── main.tf
│       ├── outputs.tf
│       └── variables.tf
├── outputs.tf
├── providers
│   └── provider.tf
└── variables.tfYou can then edit these files to define your infrastructure resources and variables.Deleting a projectTo delete an existing project, use the delete command and specify the project name:terramagicdelete--name<project_name>For example, to delete the "myapp" project, run:terramagicdelete--nameinfraHelp
For detailed information about available commands and options, run:terramagic--helpThis will display the following message:Usage:terramagic[OPTIONS]COMMAND[ARGS]...ClItooltocreateTerraformproject

Options:-v,--versionShowversion--helpShowthismessageandexit.

Commands:createCreateanewTerraformprojectwithspecifiednameandenvironmentremoveDeletetheprojectEnjoy using Terramagic to simplify your Terraform workflow!
Package: terramare
terramareAutomatically construct complex objects from simple Python types.Highlights:No boilerplate:terramareuses Python's standard type hints to determine how to construct instances of a class;Format-agnostic:terramaretakes simple Python types as input - pass it the output fromjson.load,toml.load, oryaml.load;Non-invasive:terramarerequires no modifications to your existing classes and functions beyond standard type hints;Full documentation available athttps://tomwatson1024.gitlab.io/terramare/.ExampleDeserializing a Simple ClassConsider the following simple class, defined usingattrsfor brevity:>>>fromtypingimportList>>>importattr>>>importterramare>>>@attr.s(auto_attribs=True)...classExample:...words:List[str]......def__str__(self):...return" ".join(self.words)Deserializing an instance of the class from a dictionary is as simple as:>>>print(terramare.structure({"words":["hello","world!"]},into=Example))helloworld!Deserializing a More Complex ClassConsider thePersonclass defined below:>>>fromtypingimportNamedTuple,NewType,Sequence>>>importattr>>>importterramare# `terramare` handles NamedTuples>>>classLocation(NamedTuple):...longitude:float...latitude:float# `terramare` handles NewType aliases>>>JobTitle=NewType("JobTitle",str)# `terramare` handles custom classes [experimental]>>>@terramare.auto...classOccupation:...def__init__(self,title:JobTitle,field:str):...self.title=title...self.field=field......def__eq__(self,other):...ifisinstance(other,self.__class__):...returnvars(self)==vars(other)...returnFalse......def__repr__(self):...return"Occupation('{0.title}', '{0.field}')".format(self)>>>@attr.s(auto_attribs=True)...classPerson:...name:str...age:int...friends:Sequence[str]......# `terramare` handles complex member variable types...location:Location...occupation:OccupationAgain, deserialization is a single function call:>>>terramare.structure(...{..."name":"Alice",..."age":20,..."friends":["Bob","Charlie"],..."location":[51.5074,0.1278],..."occupation":{"title":"programmer","field":"technology"}...},...into=Person,...)Person(name='Alice',age=20,friends=['Bob','Charlie'],location=Location(longitude=51.5074,latitude=0.1278),occupation=Occupation('programmer','technology'))InstallationInstall usingpip:pipinstallterramareAlternativesCheck out:pydantic-"Data validation and settings management using python type annotations". A much more mature library also using Python's standard type hints for deserialization that requires a little more integration with your code;schematics-"...combine types into structures, validate them, and transform the shapes of your data based on simple descriptions". Uses custom types instead of Python's standard type hints;cerberus-"...provides powerful yet simple and lightweight data validation functionality out of the box and is designed to be easily extensible, allowing for custom validation". Schema validation that doesn't change the type of the primitive value.
Package: terraobject
TerraobjectTerraobject package to share variables between terrascript componentsYou can use the Terraobject to parameter to several classes and share resources to be used by other terraform resources.Examples:# Create the referencefromterraobjectimportTerraobject# Import the terrascript resources you needfromterrascriptimportproviderfromterrascript.digitalocean.dimportdigitalocean_volume# Create the objecto=Terraobject()# Add the providers, resources, data, as usualo.terrascript.add(provider("digitalocean",token="tokentoken"))# Get some info (e.g. data) and share to be used on other commandspersistent_volume=digitalocean_volume("persistent_volume",name="volume-nyc3-01",region="abc")o.terrascript.add(persistent_volume)o.shared['persistent_volume']=persistent_volume# And you can use and another place:o.shared['persistent_volume'].name# Dump the XMLprint(o.terrascript.dump())More information about terrascript:https://github.com/mjuenema/python-terrascript