feat: 在 create_instance.sh 中添加租户名称获取功能并更新标签
This commit is contained in:
@@ -409,7 +409,15 @@ main() {
|
||||
fi
|
||||
|
||||
local metadata="{\"user_data\":\"$(generate_user_data "$password")\"}"
|
||||
local tags="{\"RootPassword\":\"$password\"}"
|
||||
|
||||
log_info "正在获取租户名称..."
|
||||
local tenant_name
|
||||
tenant_name=$(oci iam tenancy get --tenancy-id "$ocid" \
|
||||
--query 'data.name' --raw-output 2>/dev/null)
|
||||
check_return $? "获取租户名称失败"
|
||||
log_info "租户名称: $tenant_name"
|
||||
|
||||
local tags="{\"RootPassword\":\"$password\",\"TenantName\":\"$tenant_name\"}"
|
||||
|
||||
# 获取可用域
|
||||
log_info "正在获取可用域列表..."
|
||||
|
||||
Reference in New Issue
Block a user