AWS related functions for the qe-sap-deployment test lib
Copyright 2025 SUSE LLC
SPDX-License-Identifier: FSFAP
QE SAP <qe-sap@suse.de>
Package with AWS related methods for qe-sap-deployment
Return a list of subnets. Return a single subnet for each region.
Creates a AWS credentials file as required by QE-SAP Terraform deployment code.
Creates a AWS configuration file in ~/.aws/config
as required by the QE-SAP Terraform & Ansible deployment code.
Content is mostly (only) about region.
Get the vpc_id of a given instance in the cluster.
This function looks for the cluster using the aws describe-instances
and filtering by terraform deployment_name value, that qe-sap-deployment
is kind to use as tag for each resource.
Example:
qesap_aws_get_transit_gateway_vpc_attachment(name => 'SOMETHING')
Result internally in aws cli to be called like
aws ec2 describe-transit-gateway-attachments --filter='Name=tag:Name,Values=SOMETHING
Only one filter mode is supported at any time.
Returns a HASH reference to the decoded JSON returned by the AWS command or undef on failure.
Call create-transit-gateway-vpc-attachment and
wait until Transit Gateway Attachment is available.
Return 1 (true) if properly managed to create the transit-gateway-vpc-attachment
Return 0 (false) if create-transit-gateway-vpc-attachment fails or
the gateway does not become active before the timeout
Call delete-transit-gateway-vpc-attachment and
wait until Transit Gateway Attachment is deleted.
Return 1 (true) if properly managed to delete the transit-gateway-vpc-attachment
Return 0 (false) if delete-transit-gateway-vpc-attachment fails or
the gateway does not become inactive before the timeout
Generic function to compose a aws cli command with:
- `aws ec2` something
- use both `filter` and `query`
- has text output
Return the Transient Gateway ID of the IBS Mirror
Get the VPC tag workspace defined in
https://github.com/SUSE/qe-sap-deployment/blob/main/terraform/aws/infrastructure.tf
Get the Routing table: searching Routing Table with external connection
and get the RouteTableId
Create a pair of network peering between
the two provided deployments.
Return 1 (true) if the overall peering procedure completes successfully