Skip to main content

Allows for the creation of custom pulumi resources.

Project description

Xby2 Azure Cloud Practice Library

Steps for getting started:

  • Install this package
  • Run xby2-init
  • Activate virtual environment (.\venv\Scripts\activate)
  • Install requirements (pip install -r requirements.txt)
  • Add resources to resources.json file
  • Run pulumi up (using active Azure profile)
  • Push to BitBucket repo (Coming Soon)

VN:

Here are the fields you can customize in KWARGS and the (defaults):

  • "address_spaces": "full",
  • "resource_name": "test-vn",
  • "dns_servers": ["10.0.0.4", "10.0.0.5"],
  • "subnet_address_prefixes":["10.0.1.0/24", "10.0.2.0/24"],
  • "subnet_names":["test-subnet-0", "test-subnet-1"]

Security Group:

Here are the fields you can customize in KWARGS and the (defaults):

  • "resource_name": "test-security-group"

LB:

Here are the fields you can customize in KWARGS and the (defaults):

  • resource_name (test-lb)

VM:

Here are the fields you can customize in KWARGS and the (defaults):

  • "resource_name": "test-vm",

  • "network_interface_name": "network_interface",

  • "private_ip_address_allocation": "Dynamic",

  • "subnet_id": "test-subnet-0",

  • "vm_size": "Standard_DS1_v2",

  • "sod_name": "test_storage_os_disk",

  • "sod_caching": "ReadWrite",

  • "sod_create_option": "FromImage",

  • "sod_managed_disk_type": "Standard_LRS"

DB:

Here are the fields you can customize in KWARGS and the (defaults):

  • "resource_name": "test-db",
  • "server_name": "erase-me"

Blob:

Here are the fields you can customize in KWARGS and the (defaults):

  • "resource_name": "testblob",
  • "storage_account_name": "testaccount",
  • "storage_container_name": "testcontainer",
  • "type": "Page",
  • "size": 512

App Service

  • "resource_name": "test-app-service"

Nat Gateway

  • "resource_name": "test-nat-gateway"

Resource Group

Resource groups are presently the only resource where an existing instance can be retrieved from Azure as a part of our default library. This can be accomplished using an additional boolean in the resource group entry of the config file. When this variable (called "does_exist") is set to true, the program will attempt to retrieve the resource group that corresponds to the parameters provided in the overrides dictionary. The only required parameters are "resource_name" and "id" but you can feel free to include the others described in the documentation.

SSIS IR

  • "resource_name": "test-ssis-ir",
  • "data_factory_id": "test-data-factory",
  • "node_size": "Standard_D1_v2",
  • "location": "eastus2"

Virtual Network Peering

  • "resource_name": "test-ssis-ir",
  • "remote_virtual_network_id": "test",
  • "virtual_network_name": "test"

Adding Resources:

Keep the order of declaration in mind. For example, the resource group, followed by the VN should likely be the first things declared. When using the options above, the resource will use require a "module", which will refer to a file within the BaseAzure folder, a "resource_name", which will be the name of one of our custom classes, "overrides", which will be a list of any parameters that we want changed from the default values, and a boolean: "req_vn". This will indicate whether a particular resource will need us to pass in a vn. Additionally, we can create resources that we haven't customized. This will require a "module", which will probably begin with "pulumi_azure.", the "resource_name", which will be a class within said module, "overrides", which will consist of all of the parameters needed for this resource, and the aforementioned booleans. Below is an example of an item in the resources list:

{
    "module": "BaseAzure.vm",
    "resource_name": "BaseVM",
    "overrides": {},
    "req_vn": true
}

Resource Booleans

Resource req_vn
BaseBlob false
BaseDB false
BaseSecurityGroup true
BaseVM true
BaseVN false
BaseLB false
BaseResourceGroup false
BaseSSIS false
BaseVirtualNetworkPeering false
BaseNatGateway false
BaseAppService false

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Xby2Azure-1.0.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file Xby2Azure-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: Xby2Azure-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.1

File hashes

Hashes for Xby2Azure-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 580cd8bd6a7b17e5a00ed7795b674b24ee66409ce9aec62e9a1b757cebe64ef0
MD5 3d6548dcad1f662bcd0ea20cd35702fa
BLAKE2b-256 2e6ebb4738390a659a8ae2f1d9822afd3d04036d5589917ed933e09af9d2a6f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page