Add AWS session token support and existing VPC/subnet support #748
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds comprehensive support for AWS temporary credentials and existing VPC/subnet infrastructure, addressing modern AWS authentication requirements and organizational security policies.
Features Added
1. AWS Session Token Support
2. Existing VPC/Subnet Support
Files Modified (15 files)
Core Application (2 files):
Configuration (1 file):
AWS Terraform (3 files):
vSphere Terraform (3 files):
Infrastructure Scripts (1 file):
Shell Scripts (4 files):
Key Fixes
Destroy command session token loading (px-deploy.go:1271)
AWS instance naming convention (terraform/aws/main.tf)
Nil pointer handling (aws.go:391-412)
IAM key age check (aws.go:800-804)
Testing Performed
✅ Successfully deployed with temporary credentials (IAM Identity Center) ✅ Successfully deployed with existing VPC and subnet ✅ All nodes became Ready, Portworx installed successfully ✅ Status and connect commands worked correctly
✅ Destroy command worked with refreshed credentials ✅ Tested across multiple AWS accounts with different SCPs ✅ Backward compatibility verified (works without session token)
Backward Compatibility
✅ 100% backward compatible - no breaking changes
Security
✅ No security regressions
Use Cases Addressed