Skip to main content

Allows for the creation of custom pulumi resources.

Project description

Xby2 AWS Cloud Practice Library

VPC:

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

  • availability_zones (2)
  • cidr_block:
    • partial: 192.168.0.0/16
    • full: 10.0.0.0/16 (default)
    • else: 172.31.0.0/16
  • private_subnets (1)
  • public_subnets (1)
  • nat_gateways:
    • ONE_PER_AZ (default)
    • SINGLE: one nat gateway total
    • else/NONE: no nat gateways
  • private_cidr_mask (22)
  • public_cidr_mask (20)
  • resource_name (test-vpc)

Security Group:

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

  • protocol (tcp)
  • i_from_port (0)
  • i_to_port (65535)
  • e_from_port (0)
  • e_to_port (65535)
  • i_cidr (10.0.0.0/16)
  • e_cidr (10.0.0.0/16)
  • resource_name (test-sec-group)

ELB:

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

  • resource_name (test-lb)

EC2:

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

  • resource_name (test-ec2)
  • instance_type (t3a.micro)

RDS:

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

  • rds_instance_class (db.t4g.micro)
  • allocated_storage (8)
  • engine (PostgreSQL)
  • password (password)
  • username (username)
  • resource_name (test-rds)

AMI:

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

  • most_recent (True)
  • owners (["amazon"])
  • filters ([{"name": "description", "values": ["Amazon Linux 2 *]}])

Adding Resources:

Keep the order of declaration in mind. For example, the VPC should likely be the first thing declared. When using the options above, the resource will use require a "module", which will refer to a file within the Xby2AWS 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 two booleans: "req_vpc" and "req_ami". These will indicate whether a particular resource will need us to pass in a vpc or an ami, respectively. Additionally, we can create resources that we haven't customized. This will require a "module", which will probably begin with either "pulumi_aws." or "pulumi_awsx.", 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. For example:

{
    "module": "Xby2AWS.elb",
    "resource_name": "Xby2ELB",
    "overrides": {},
    "req_vpc": true,
    "req_ami": false
},
{
    "module": "pulumi_aws.s3",
    "resource_name": "Bucket",
    "overrides": {
        "resource_name": "the-bucket"
    },
    "req_vpc": false,
    "req_ami": false
}

Resource Booleans

Resource req_vpc req_ami
Xby2AMI false false
Xby2VPC false false
Xby2SecurityGroup true false
Xby2EC2 true true
Xby2RDS true false
Xby2ELB true false
Bucket false 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 Distribution

Xby2AWS-1.0.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

Xby2AWS-1.0.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file Xby2AWS-1.0.1.tar.gz.

File metadata

  • Download URL: Xby2AWS-1.0.1.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.1

File hashes

Hashes for Xby2AWS-1.0.1.tar.gz
Algorithm Hash digest
SHA256 16489d1f165082403b3a1289721ea7aa4d31d4df7ffb8e06b81e9343e2405fb8
MD5 75216155fc8bc1602ae2fa989cab7098
BLAKE2b-256 43d6cf1c8090c177e1f0e86584b44eda7de913e6d3199a7a3853a985038aeaf0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for Xby2AWS-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8ec47525dfe7dfba1376e1967537ae8829ee9962c6ca746f171bd87c5254e40
MD5 6ab6e01b0d7b64407bdfcdc347506765
BLAKE2b-256 fac6d842711ec0f018e906f984cdb30801166d107781a98f6649fade8a19112f

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