1
0
mirror of synced 2024-11-28 15:56:01 +03:00

- increase key name combination to 20 characters of length

- add ID to the profiles download link
This commit is contained in:
Scottpedia 2023-08-20 11:21:34 +08:00
parent b062dbac1a
commit e5a46b4bf0

View File

@ -401,7 +401,7 @@
"'''",
"def handler(event, context):",
" try:",
" keyName = 'setup-ipsec-vpn-' + ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(10)).lower()",
" keyName = 'setup-ipsec-vpn-' + ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(20)).lower()",
" region = event['ResourceProperties']['Region']",
" ec2 = boto3.client('ec2',region)",
" response = ec2.create_key_pair(",
@ -724,7 +724,14 @@
"RegionalDomainName"
]
},
"/profiles.zip"
"/",
{
"Fn::GetAtt": [
"KeyPairInfo",
"KeyName"
]
},
"-profiles.zip"
]
]
}