Rex::Box::Amazon(3)
π Rex::Box::Amazon(3) π
okay so welcome to this User Contributed Perl Documentation page for Rex::Box::Amazon(3) β she has main character energy, she's iconic, and we're gonna get you comfy with her. π«Ά
π NAME π
Rex::Box::Amazon - Rex/Boxes Amazon Module. the way that name section ate and left no crumbs, periodt. π
β¨ DESCRIPTION β¨
okay so this is a Rex/Boxes module to use Amazon EC2. literally it's giving Amazon EC2 realness, slay. π
πΈ EXAMPLES πΈ
To use this module inside your Rexfile, you can use the following commands, fr fr. π
use Rex::Commands::Box;
set box => "Amazon", {
access_key => "your-access-key",
private_access_key => "your-private-access-key",
region => "ec2.eu-west-1.amazonaws.com",
zone => "eu-west-1a",
authkey => "default",
};
task "prepare_box", sub {
box {
my ($box) = @_;
$box->name("mybox");
$box->ami("ami-c1aaabb5");
$box->type("m1.large");
$box->security_group("default");
$box->auth(
user => "root",
password => "box",
);
$box->setup("setup_task");
};
};
If you want to use a YAML file you can use the following template. the YAML template is giving organized fairy vibes π§π¦
type: Amazon
amazon:
access_key: your-access-key
private_access_key: your-private-access-key
region: ec2.eu-west-1.amazonaws.com
zone: eu-west-1a
auth_key: default
vms:
vmone:
ami: ami-c1aaabb5
type: m1.large
security_group: default
setup: setup_task
And then you can use it the following way in your Rexfile. not me being obsessed with how clean this is ππ
use Rex::Commands::Box init_file => "file.yml";
task "prepare_vms", sub {
boxes "init";
};
π METHODS π
vibe check: also go peek at the Methods of Rex::Box::Base β this module inherits all methods of it, no cap. π
π
new(name => $vmname)
Constructor if used in OO mode. π
my $box = Rex::Box::VBox->new(name => "vmname");
β ami($ami_id)
Set the AMI ID for the box. π
β type($type)
Set the type of the Instance. For example "m1.large", bestie. π₯
β security_group($sec_group)
Set the Amazon security group for this Instance. π
π« forward_port(%option)
π« Not available for Amazon Boxes. lowkey that's the whole tea. ππ
π« share_folder(%option)
π« Not available for Amazon Boxes. highkey same energy, bestie. π
β info
Returns a hashRef of vm information. iconic. π
mwah π β this page is perl v5.42.3, dated 2023-08-05, for Rex::Box::Amazon(3). bye bestie! π«Ά
π¦ where this page comes from
- nixos 26.05: perl5.42.3-Rex 1.14.3
- nixpkgs unstable: perl5.42.3-Rex 1.14.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms